filediff-1.0.0.2: Diffing and patching module

Safe HaskellNone
LanguageHaskell2010

Filediff.Types

Description

Data types used by Filediff

Synopsis

Documentation

data Filediff Source

The basic data type for a difference between two files. The "base" FilePath is the file chose state is being compared against, and the "comp" FilePath is the file being compared (the "later" of the two).

Constructors

Filediff 

data Diff Source

A data type for differences between directories. filediffs stores Filediffs whose filepaths are relative to directories being diffed.

Constructors

Diff 

Fields

filediffs :: [Filediff]
 

data FileChange Source

The types and sets of changes possible between two files.

Constructors

Del (ListDiff Line) 
Mod (ListDiff Line) 
Add (ListDiff Line) 

data ListDiff a Source

Diff between two lists. dels represents the indices at which to delete, and adds represents the indices and contents to add.

Constructors

ListDiff 

Fields

dels :: [(Int, a)]
 
adds :: [(Int, a)]
 

Instances

Eq a => Eq (ListDiff a) 
Show a => Show (ListDiff a) 
Generic (ListDiff a) 
(Eq a, Ord a, MemoTable a) => Monoid (ListDiff a) 
Default (ListDiff a) 
type Rep (ListDiff a) 

isDel :: FileChange -> Bool Source

Whether a FileChange is a deletion or not.

isMod :: FileChange -> Bool Source

Whether a FileChange is a modification or not.

isAdd :: FileChange -> Bool Source

Whether a FileChange is a addition or not.

type Line = Text Source

Data type for a line.

type Error = String Source

Basic error type.