diff3-0.2.0: Perform a 3-way difference of documents

Safe HaskellSafe-Inferred

Data.Algorithm.Diff3

Description

An implementation of a 3-way merge algorithm.

Synopsis

Documentation

data Hunk a Source

A hunk is a collection of changes that occur in a document. A hunk can be some changes only in A, only in B, in both A & B (equally), or conflicting between A, B and the original document.

Constructors

ChangedInA [a] 
ChangedInB [a] 
Both [a] 
Conflict [a] [a] [a] 

Instances

Eq a => Eq (Hunk a) 
Show a => Show (Hunk a) 

diff3 :: Eq a => [a] -> [a] -> [a] -> [Hunk a]Source

Perform a 3-way diff against 2 documents and the original document.

merge :: [Hunk a] -> Either [Hunk a] [a]Source