MarkupParse.Patch
Description
A patch function for tree-diff.
patch :: ToExpr a => a -> a -> Maybe (Edit EditExpr) Source #
ediff with unchanged sections filtered out
ediff
>>> show $ ansiWlEditExpr <$> patch [1, 2, 3, 5] [0, 1, 2, 4, 6] "Just [+0, -3, +4, -5, +6]"
>>>
show $ ansiWlEditExpr <$> patch [1, 2, 3, 5] [0, 1, 2, 4, 6]
goldenPatch :: ToExpr a => (FilePath -> IO a) -> (a -> a) -> FilePath -> TestTree Source #
compare a markup file with a round-trip transformation.