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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Commute

Synopsis

Documentation

class Commute p where Source #

Commute represents things that can be (possibly) commuted.

Minimal complete definition

commute

Methods

commute :: (p :> p) wX wY -> Maybe ((p :> p) wX wY) Source #

Instances

Commute DummyPatch Source # 
Commute p => Commute (RL p) Source # 

Methods

commute :: (RL p :> RL p) wX wY -> Maybe ((RL p :> RL p) wX wY) Source #

Commute p => Commute (FL p) Source # 

Methods

commute :: (FL p :> FL p) wX wY -> Maybe ((FL p :> FL p) wX wY) Source #

Commute p => Commute (Named p) Source # 

Methods

commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) Source #

Commute (RebaseName p) Source # 

Methods

commute :: (RebaseName p :> RebaseName p) wX wY -> Maybe ((RebaseName p :> RebaseName p) wX wY) Source #

PrimPatchBase p => Commute (RebaseFixup p) Source # 

Methods

commute :: (RebaseFixup p :> RebaseFixup p) wX wY -> Maybe ((RebaseFixup p :> RebaseFixup p) wX wY) Source #

PrimPatch prim => Commute (RepoPatchV2 prim) Source # 

Methods

commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) Source #

Commute p => Commute (LabelledPatch p) Source # 
Commute (RebaseChange p) Source # 

Methods

commute :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) Source #

(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => Commute (RebaseSelect p) Source # 

Methods

commute :: (RebaseSelect p :> RebaseSelect p) wX wY -> Maybe ((RebaseSelect p :> RebaseSelect p) wX wY) Source #

Commute p => Commute (WrappedNamed rt p) Source # 

Methods

commute :: (WrappedNamed rt p :> WrappedNamed rt p) wX wY -> Maybe ((WrappedNamed rt p :> WrappedNamed rt p) wX wY) Source #

Commute p => Commute (PatchInfoAnd rt p) Source # 

Methods

commute :: (PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY -> Maybe ((PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY) Source #

commuteFL :: Commute p => (p :> FL p) wX wY -> Maybe ((FL p :> p) wX wY) Source #

commuteFL commutes a single element past a FL.

commuteFLorComplain :: Commute p => (p :> FL p) wX wY -> Either (Sealed2 p) ((FL p :> p) wX wY) Source #

commuteFLorComplain attempts to commute a single element past a FL. If any individual commute fails, then we return the patch that first patch that cannot be commuted past.

commuteRL :: Commute p => (RL p :> p) wX wY -> Maybe ((p :> RL p) wX wY) Source #

commuteRL commutes a RL past a single element.

commuteRLFL :: Commute p => (RL p :> FL p) wX wY -> Maybe ((FL p :> RL p) wX wY) Source #

commuteRLFL commutes an RL past an FL.

selfCommuter :: Commute p => CommuteFn p p Source #

Build a commuter between a patch and itself using the operation from the type class.