Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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)
- toFwdCommute :: (Commute p, Commute q, Monad m) => ((p :< q) wX wY -> m ((q :< p) wX wY)) -> (q :> p) wX wY -> m ((p :> q) wX wY)
- toRevCommute :: (Commute p, Commute q, Monad m) => ((p :> q) wX wY -> m ((q :> p) wX wY)) -> (q :< p) wX wY -> m ((p :< q) wX wY)
- selfCommuter :: Commute p => CommuteFn p p
Documentation
Commute represents things that can be (possibly) commuted.
Commute Prim | |
Commute Prim | |
Commute DummyPatch | |
Commute p => Commute (RL p) | |
Commute p => Commute (FL p) | |
(Commute p, NameHack p) => Commute (Named p) | |
Commute (RebaseName p) | |
PrimPatchBase p => Commute (RebaseFixup p) | |
PrimPatch prim => Commute (Patch prim) | |
PrimPatch prim => Commute (RealPatch prim) | |
(Commute p, NameHack p) => Commute (PatchInfoAnd p) | |
(PrimPatchBase p, FromPrim p, Effect p, Invert p, Commute p) => Commute (Rebasing p) | |
Commute (RebaseChange p) | |
(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p, NameHack p) => Commute (RebaseSelect p) | |
Commute p => Commute (LabelledPatch p) |
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
.
toFwdCommute :: (Commute p, Commute q, Monad m) => ((p :< q) wX wY -> m ((q :< p) wX wY)) -> (q :> p) wX wY -> m ((p :> q) wX wY) Source
Swaps the ordered pair type so that commute can be called directly.
toRevCommute :: (Commute p, Commute q, Monad m) => ((p :> q) wX wY -> m ((q :> p) wX wY)) -> (q :< p) wX wY -> m ((p :< q) wX wY) Source
Swaps the ordered pair type from the order expected by commute to the reverse order.
selfCommuter :: Commute p => CommuteFn p p Source
Build a commuter between a patch and itself using the operation from the type class.