Maintainer | darcs-devel@darcs.net |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- class Commute p => Merge p where
- selfMerger :: Merge p => MergeFn p p
- mergeFL :: Merge p => (p :\/: FL p) wX wY -> (FL p :/\: p) wX wY
- naturalMerge :: (Invert p, Commute p) => (p :\/: p) wX wY -> Maybe ((p :/\: p) wX wY)
- prop_mergeSymmetric :: (Eq2 p, Merge p) => (p :\/: p) wX wY -> Bool
- prop_mergeCommute :: (Eq2 p, Merge p) => (p :\/: p) wX wY -> Bool
Definitions
class Commute p => Merge p where Source #
Things that can always be merged.
Instances should obey the following laws:
- Symmetry
merge (p :\/: q) == q' :/\: p' <=> merge (q :\/: p) == p' :/\: q'
- MergesCommute
merge (p :\/: q) == q' :/\: p' ==> commute (p :> q') == Just (q :> p')
that is, the two branches of a merge commute to each other
Merge DummyPatch Source # | |
Merge p => Merge (RL p) Source # | |
Merge p => Merge (FL p) Source # | |
Merge p => Merge (LabelledPatch p) Source # | |
Merge p => Merge (Named p) Source # | |
PrimPatch prim => Merge (RepoPatchV2 prim) Source # | |
Merge p => Merge (WrappedNamed rt p) Source # | |
Merge p => Merge (PatchInfoAnd rt p) Source # | |
selfMerger :: Merge p => MergeFn p p Source #
naturalMerge :: (Invert p, Commute p) => (p :\/: p) wX wY -> Maybe ((p :/\: p) wX wY) Source #
The natural, non-conflicting merge.