ModuleDiff-2.0.1Haskell2010
Data.Algorithm.DiffOutput
Generates a string output that is similar to diff normal mode.
- 3 types
- 5 values
- PackageDiff-2.0.1
- Exports8
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDiffOutput.hs
Pretty print the differences. The output is similar to the output of the diff utility.
> putStr (ppDiff (getGroupedDiff ["a","b","c","d","e"] ["a","c","d","f"]))
2d1
< b
5c4
< e
---
> fPretty print of diff operations.
Parse pretty printed Diffs as DiffOperations.
Line number alias. Always non-negative.
Line Range: start, end and contents.
The following invariants hold:
snd lrNumbers >= fst lrNumbers
snd lrNumbers - fst lrNumbers + 1 == length lrContentswhich imply lrContents cannot be empty.
Smart constructor for LineRange that computes the end line from the start line and the content length, guaranteeing that its content length and range match.
Diff operation representing changes to apply.
Instances4Eq, Ord, Read, Show
Eq a => Eq (DiffOperation a)Defined in Diff-2.0.1 · Data.Algorithm.DiffOutputOrd a => Ord (DiffOperation a)Defined in Diff-2.0.1 · Data.Algorithm.DiffOutputRead a => Read (DiffOperation a)Defined in Diff-2.0.1 · Data.Algorithm.DiffOutputShow a => Show (DiffOperation a)Defined in Diff-2.0.1 · Data.Algorithm.DiffOutput