Diff-0.1.2: O(ND) diff algorithm in haskell.ContentsIndex
Data.Algorithm.Diff
Portabilityportable
Stabilityexperimental
Maintainers.clover@gmail.com
Description
This is an implementation of the O(ND) diff algorithm as described in "An O(ND) Difference Algorithm and Its Variations (1986)" http://citeseer.ist.psu.edu/myers86ond.html. It is O(mn) in space. The algorithm is the same one used by standared Unix diff. The assumption is that users of this library will want to diff over interesting things or peform interesting tasks with the results (given that, otherwise, they would simply use the standard Unix diff utility). Thus no attempt is made to present a fancier API to aid in doing standard and uninteresting things with the results.
Synopsis
data DI
= F
| S
| B
getDiff :: Eq t => [t] -> [t] -> [(DI, t)]
getGroupedDiff :: Eq t => [t] -> [t] -> [(DI, [t])]
Documentation
data DI
Difference Indicator. A value is either from the First list, the Second or from Both.
Constructors
F
S
B
show/hide Instances
getDiff :: Eq t => [t] -> [t] -> [(DI, t)]
Takes two lists and returns a list indicating the differences between them.
getGroupedDiff :: Eq t => [t] -> [t] -> [(DI, [t])]
Takes two lists and returns a list indicating the differences between them, grouped into chunks.
Produced by Haddock version 0.8