The standard O(ND) diff algorithm in pure Haskell, with pretty-printing utilities
open sourceDiff BSD 3-clause licencefree
Diff is a pure-Haskell implementation of the standard diff algorithm, written by Sterling Clover and now maintained by seereason. It runs in O(ND) time, where N is the input length and D the number of differences, and O(D^2) space, and includes utilities for pretty-printing the differences it finds. Its source can be checked with LiquidHaskell.
Problems it solves
- compute the differences between two lists or texts in Haskell
- show a line-by-line diff of two strings from a Haskell program
- find the minimal edit between two sequences in pure Haskell
Features
- O(ND) time and O(D^2) space diff algorithm
- pretty-printing utilities for differences
- source checkable with LiquidHaskell
