-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Perform a 3-way difference of documents -- -- Perform a 3-way difference of documents @package diff3 @version 0.3.1 -- | An implementation of a 3-way merge algorithm. module Data.Algorithm.Diff3 -- | 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. All hunks take 3 -- constructors, which are, in order - the elements in the left document, -- the original document, and the right document. This order matches the -- order of parameters to diff3. data Hunk a LeftChange :: [a] -> Hunk a RightChange :: [a] -> Hunk a Unchanged :: [a] -> Hunk a Conflict :: [a] -> [a] -> [a] -> Hunk a -- | Perform a 3-way diff against 2 documents and the original document. -- This returns a list of Hunks, where each Hunk contains -- the original document, a change in the left or right side, or is in -- conflict. This can be considered a 'low level' interface to the 3-way -- diff algorithm - you may be more interested in merge. diff3 :: Eq a => [a] -> [a] -> [a] -> [Hunk a] merge :: [Hunk a] -> Either [Hunk a] [a] instance GHC.Show.Show a => GHC.Show.Show (Data.Algorithm.Diff3.Hunk a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Algorithm.Diff3.Hunk a) instance GHC.Base.Functor Data.Algorithm.Diff3.Hunk