Diff-0.3.4: O(ND) diff algorithm in haskell.

Copyright(c) David Fox (2015)
LicenseBSD 3 Clause
Maintainers.clover@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.Algorithm.DiffContext

Description

Author : David Fox (ddssff at the email service from google)

Generates a grouped diff with merged runs, and outputs them in the manner of diff -u

Synopsis

Documentation

getContextDiff :: Eq a => Int -> [a] -> [a] -> ContextDiff a Source #

Do a grouped diff and then split up the chunks into runs that contain differences surrounded by N lines of unchanged text. If there is less then 2N+1 lines of unchanged text between two changes, the runs are left merged.

prettyContextDiff Source #

Arguments

:: Doc

Document 1 name

-> Doc

Document 2 name

-> (c -> Doc)

Element pretty printer

-> ContextDiff c 
-> Doc 

Pretty print a ContextDiff in the manner of diff -u.