darcs-2.10.1: a distributed, interactive, smart revision control system

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Witnesses.Eq

Synopsis

Documentation

data EqCheck wA wB where Source

EqCheck is used to pass around evidence (or lack thereof) of two witness types being equal.

Constructors

IsEq :: EqCheck wA wA 
NotEq :: EqCheck wA wB 

Instances

Eq (EqCheck wA wB) 
Show (EqCheck wA wB) 

class MyEq p where Source

An witness aware equality class. A minimal definition defines any one of unsafeCompare, =\/= and =/\=.

Minimal complete definition

Nothing

Methods

unsafeCompare :: p wA wB -> p wC wD -> Bool Source

It is unsafe to define a class instance via this method, because if it returns True then the default implementations of =\/= and =/\= will coerce the equality of two witnesses.

Calling this method is safe, although =\/= or =/\= would be better choices as it is not usually meaningul to compare two patches that don't share either a starting or an ending context

(=\/=) :: p wA wB -> p wA wC -> EqCheck wB wC infix 4 Source

Compare two things with the same starting witness. If the things compare equal, evidence of the ending witnesses being equal will be returned.

(=/\=) :: p wA wC -> p wB wC -> EqCheck wA wB infix 4 Source

Compare two things with the same ending witness. If the things compare equal, evidence of the starting witnesses being equal will be returned.

Instances

MyEq DirPatchType 
MyEq FilePatchType 
MyEq Prim 
MyEq Prim 
MyEq Hunk 
MyEq DummyPatch 
MyEq WPatchInfo 
(MyEq p, Commute p) => MyEq (RL p) 
(MyEq p, Commute p) => MyEq (FL p) 
(Commute p, MyEq p) => MyEq (Named p) 
MyEq (RebaseName p) 
MyEq (PrimOf p) => MyEq (RebaseFixup p) 
MyEq prim => MyEq (Patch prim) 
PrimPatch prim => MyEq (RealPatch prim) 
MyEq (PatchInfoAnd p) 
(PrimPatchBase p, Commute p, MyEq p) => MyEq (RebaseSelect p) 
MyEq p => MyEq (LabelledPatch p) 
(MyEq a, MyEq b) => MyEq ((:<) a b) 
(MyEq a, MyEq b) => MyEq ((:>) a b)