darcs-2.12.5: 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) Source # 

Methods

(==) :: EqCheck wA wB -> EqCheck wA wB -> Bool #

(/=) :: EqCheck wA wB -> EqCheck wA wB -> Bool #

Show (EqCheck wA wB) Source # 

Methods

showsPrec :: Int -> EqCheck wA wB -> ShowS #

show :: EqCheck wA wB -> String #

showList :: [EqCheck wA wB] -> ShowS #

class MyEq p where Source #

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

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 Prim Source # 

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

MyEq Hunk Source # 

Methods

unsafeCompare :: Hunk wA wB -> Hunk wC wD -> Bool Source #

(=\/=) :: Hunk wA wB -> Hunk wA wC -> EqCheck wB wC Source #

(=/\=) :: Hunk wA wC -> Hunk wB wC -> EqCheck wA wB Source #

MyEq DirPatchType Source # 

Methods

unsafeCompare :: DirPatchType wA wB -> DirPatchType wC wD -> Bool Source #

(=\/=) :: DirPatchType wA wB -> DirPatchType wA wC -> EqCheck wB wC Source #

(=/\=) :: DirPatchType wA wC -> DirPatchType wB wC -> EqCheck wA wB Source #

MyEq FilePatchType Source # 

Methods

unsafeCompare :: FilePatchType wA wB -> FilePatchType wC wD -> Bool Source #

(=\/=) :: FilePatchType wA wB -> FilePatchType wA wC -> EqCheck wB wC Source #

(=/\=) :: FilePatchType wA wC -> FilePatchType wB wC -> EqCheck wA wB Source #

MyEq Prim Source # 

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

MyEq DummyPatch Source # 

Methods

unsafeCompare :: DummyPatch wA wB -> DummyPatch wC wD -> Bool Source #

(=\/=) :: DummyPatch wA wB -> DummyPatch wA wC -> EqCheck wB wC Source #

(=/\=) :: DummyPatch wA wC -> DummyPatch wB wC -> EqCheck wA wB Source #

MyEq WPatchInfo Source # 

Methods

unsafeCompare :: WPatchInfo wA wB -> WPatchInfo wC wD -> Bool Source #

(=\/=) :: WPatchInfo wA wB -> WPatchInfo wA wC -> EqCheck wB wC Source #

(=/\=) :: WPatchInfo wA wC -> WPatchInfo wB wC -> EqCheck wA wB Source #

(Commute p, MyEq p) => MyEq (Named p) Source # 

Methods

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

(=\/=) :: Named p wA wB -> Named p wA wC -> EqCheck wB wC Source #

(=/\=) :: Named p wA wC -> Named p wB wC -> EqCheck wA wB Source #

MyEq (RebaseName p) Source # 

Methods

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

(=\/=) :: RebaseName p wA wB -> RebaseName p wA wC -> EqCheck wB wC Source #

(=/\=) :: RebaseName p wA wC -> RebaseName p wB wC -> EqCheck wA wB Source #

MyEq (PrimOf p) => MyEq (RebaseFixup p) Source # 

Methods

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

(=\/=) :: RebaseFixup p wA wB -> RebaseFixup p wA wC -> EqCheck wB wC Source #

(=/\=) :: RebaseFixup p wA wC -> RebaseFixup p wB wC -> EqCheck wA wB Source #

PrimPatch prim => MyEq (RepoPatchV2 prim) Source # 

Methods

unsafeCompare :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wC wD -> Bool Source #

(=\/=) :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wA wC -> EqCheck wB wC Source #

(=/\=) :: RepoPatchV2 prim wA wC -> RepoPatchV2 prim wB wC -> EqCheck wA wB Source #

MyEq p => MyEq (LabelledPatch p) Source # 

Methods

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

(=\/=) :: LabelledPatch p wA wB -> LabelledPatch p wA wC -> EqCheck wB wC Source #

(=/\=) :: LabelledPatch p wA wC -> LabelledPatch p wB wC -> EqCheck wA wB Source #

(PrimPatchBase p, Commute p, MyEq p) => MyEq (RebaseSelect p) Source # 

Methods

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

(=\/=) :: RebaseSelect p wA wB -> RebaseSelect p wA wC -> EqCheck wB wC Source #

(=/\=) :: RebaseSelect p wA wC -> RebaseSelect p wB wC -> EqCheck wA wB Source #

(MyEq a, MyEq b) => MyEq ((:>) a b) Source # 

Methods

unsafeCompare :: (a :> b) wA wB -> (a :> b) wC wD -> Bool Source #

(=\/=) :: (a :> b) wA wB -> (a :> b) wA wC -> EqCheck wB wC Source #

(=/\=) :: (a :> b) wA wC -> (a :> b) wB wC -> EqCheck wA wB Source #

MyEq (PatchInfoAnd rt p) Source # 

Methods

unsafeCompare :: PatchInfoAnd rt p wA wB -> PatchInfoAnd rt p wC wD -> Bool Source #

(=\/=) :: PatchInfoAnd rt p wA wB -> PatchInfoAnd rt p wA wC -> EqCheck wB wC Source #

(=/\=) :: PatchInfoAnd rt p wA wC -> PatchInfoAnd rt p wB wC -> EqCheck wA wB Source #

isIsEq :: EqCheck wA wB -> Bool Source #