Portability | portable |
---|---|
Stability | experimental |
Maintainer | [email protected] |
Safe Haskell | Safe-Inferred |
Data.Algorithm.Diff
Description
This is an implementation of the O(ND) diff algorithm as described in "An O(ND) Difference Algorithm and Its Variations (1986)" http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927. It is O(mn) in space. The algorithm is the same one used by standared Unix diff.
Documentation
Comparing lists for differences
Finding chunks of differences
getGroupedDiff :: Eq t => [t] -> [t] -> [Diff [t]]Source
Takes two lists and returns a list of differences between them, grouped
into chunks. This is getGroupedDiffBy
with ==
used as predicate.
getGroupedDiffBy :: (t -> t -> Bool) -> [t] -> [t] -> [Diff [t]]Source