Safe Haskell | None |
---|---|
Language | Haskell2010 |
Diffing algorithms (all exposed functions are pure)
data types
list operations
diffSequences :: forall a. (Eq a, MemoTable a) => [a] -> [a] -> SeqDiff a Source
returns (to delete, to add)
diffSequences "abcdefg" "wabxyze"
SeqDiff {dels = [2,3,5,6], adds = [(0,w
),(3,x
),(4,y
),(5,z
)]}
applySequenceDiff :: forall a. Eq a => SeqDiff a -> [a] -> [a] Source
diffSequences "abcdefg" "wabxyze"
SeqDiff {dels = [2,3,5,6], adds = [(0,w
),(3,x
),(4,y
),(5,z
)]}
applySequenceDiff it "abcdefg"
"wabxyze"