Copyright | (c) Sterling Clover 2008-2011 Kevin Charter 2011 |
---|---|
License | BSD 3 Clause |
Maintainer | s.clover@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Author : Stephan Wehr (wehrfactisresearch.com) and JP Moresmau (jp
moresmau.fr)
Generates a string output that is similar to diff normal mode
Synopsis
- diffToLineRanges :: [Diff [String]] -> [DiffOperation LineRange]
- ppDiff :: [Diff [String]] -> String
- prettyDiffs :: [DiffOperation LineRange] -> Doc
- parsePrettyDiffs :: String -> [DiffOperation LineRange]
- type LineNo = Int
- data LineRange = LineRange {
- lrNumbers :: (LineNo, LineNo)
- lrContents :: [String]
- data DiffOperation a
Documentation
diffToLineRanges :: [Diff [String]] -> [DiffOperation LineRange] Source #
Converts Diffs to DiffOperations
ppDiff :: [Diff [String]] -> String Source #
pretty print the differences. The output is similar to the output of the diff utility
prettyDiffs :: [DiffOperation LineRange] -> Doc Source #
pretty print of diff operations
parsePrettyDiffs :: String -> [DiffOperation LineRange] Source #
Parse pretty printed Diffs as DiffOperations
Line Range: start, end and contents
data DiffOperation a Source #
Diff Operation representing changes to apply