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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Commute

Synopsis

- class Commute p where
- commuteFL :: Commute p => (p :> FL p) wX wY -> Maybe ((FL p :> p) wX wY)
- commuteFLorComplain :: Commute p => (p :> FL p) wX wY -> Either (Sealed2 p) ((FL p :> p) wX wY)
- commuteRL :: Commute p => (RL p :> p) wX wY -> Maybe ((p :> RL p) wX wY)
- commuteRLFL :: Commute p => (RL p :> FL p) wX wY -> Maybe ((FL p :> RL p) wX wY)
- selfCommuter :: Commute p => CommuteFn p p

# Documentation

class Commute p where #

Commute represents things that can be (possibly) commuted.

Minimal complete definition

commute

Methods

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

Instances

Commute DummyPatch # |
Methods commute :: (DummyPatch :> DummyPatch) wX wY -> Maybe ((DummyPatch :> DummyPatch) wX wY) #
Commute p => Commute (RL p) # |
Methods commute :: (RL p :> RL p) wX wY -> Maybe ((RL p :> RL p) wX wY) #
Commute p => Commute (FL p) # |
Methods commute :: (FL p :> FL p) wX wY -> Maybe ((FL p :> FL p) wX wY) #
Commute p => Commute (Named p) # |
Methods commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) #
Commute (RebaseName p) # |
Methods commute :: (RebaseName p :> RebaseName p) wX wY -> Maybe ((RebaseName p :> RebaseName p) wX wY) #
PrimPatchBase p => Commute (RebaseFixup p) # |
Methods commute :: (RebaseFixup p :> RebaseFixup p) wX wY -> Maybe ((RebaseFixup p :> RebaseFixup p) wX wY) #
PrimPatch prim => Commute (RepoPatchV2 prim) # |
Methods commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) #
Commute p => Commute (LabelledPatch p) # |
Methods commute :: (LabelledPatch p :> LabelledPatch p) wX wY -> Maybe ((LabelledPatch p :> LabelledPatch p) wX wY) #
Commute (RebaseChange p) # |
Methods commute :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) #
(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => Commute (RebaseSelect p) # |
Methods commute :: (RebaseSelect p :> RebaseSelect p) wX wY -> Maybe ((RebaseSelect p :> RebaseSelect p) wX wY) #
Commute p => Commute (WrappedNamed rt p) # |
Methods commute :: (WrappedNamed rt p :> WrappedNamed rt p) wX wY -> Maybe ((WrappedNamed rt p :> WrappedNamed rt p) wX wY) #
Commute p => Commute (PatchInfoAnd rt p) # |
Methods commute :: (PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY -> Maybe ((PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY) #

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

`commuteFL` commutes a single element past a FL.

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

`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) #

`commuteRL` commutes a RL past a single element.

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

`commuteRLFL` commutes an `RL` past an `FL`.

selfCommuter :: Commute p => CommuteFn p p #

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