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

Safe HaskellNone

Darcs.Patch.Commute

Synopsis

Documentation

class Commute p whereSource

Things that can commute.

Methods

commute :: (p :> p) x y -> Maybe ((p :> p) x y)Source

commuteFL :: Commute p => (p :> FL p) x y -> Maybe ((FL p :> p) x y)Source

commuteFLorComplain :: Commute p => (p :> FL p) x y -> Either (Sealed2 p) ((FL p :> p) x y)Source

commuteRL :: Commute p => (RL p :> p) x y -> Maybe ((p :> RL p) x y)Source

commuteRLFL :: Commute p => (RL p :> FL p) x y -> Maybe ((FL p :> RL p) x y)Source

toFwdCommute :: (Commute p, Commute q, Monad m) => ((p :< q) x y -> m ((q :< p) x y)) -> (q :> p) x y -> m ((p :> q) x y)Source

Swaps the ordered pair type so that commute can be called directly.

toRevCommute :: (Commute p, Commute q, Monad m) => ((p :> q) x y -> m ((q :> p) x y)) -> (q :< p) x y -> m ((p :< q) x y)Source

Swaps the ordered pair type from the order expected by commute to the reverse order.