markup-parse-0.1.1: A markup parser.
Safe HaskellSafe-Inferred
LanguageGHC2021

MarkupParse.Patch

Description

A patch function for tree-diff.

Synopsis

Documentation

patch :: ToExpr a => a -> a -> Maybe (Edit EditExpr) Source #

ediff with unchanged sections filtered out

>>> showPatch $ patch [1, 2, 3, 5] [0, 1, 2, 4, 6]
"[+0, -3, +4, -5, +6]"

goldenPatch :: ToExpr a => (FilePath -> IO a) -> (a -> a) -> FilePath -> TestTree Source #

Compare a file with a round-trip transformation.

showPatch :: Maybe (Edit EditExpr) -> String Source #

Create a String representation of a patch.