Diff-0.5: Diff algorithm in pure Haskell
Copyright(c) Sterling Clover 2008-2011 Kevin Charter 2011
LicenseBSD 3 Clause
Maintainers.clover@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Algorithm.DiffOutput

Description

Generates a string output that is similar to diff normal mode

Synopsis

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

type LineNo = Int Source #

Line number alias

data LineRange Source #

Line Range: start, end and contents

Constructors

LineRange 

data DiffOperation a Source #

Diff Operation representing changes to apply

Constructors

Deletion a LineNo 
Addition a LineNo 
Change a a