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

Maintainerdarcs-devel@darcs.net
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Merge

Contents

Description

 

Synopsis

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

Minimal complete definition

merge

Methods

merge :: (p :\/: p) wX wY -> (p :/\: p) wX wY Source #

Instances

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

Methods

merge :: (RL p :\/: RL p) wX wY -> (RL p :/\: RL p) wX wY Source #

Merge p => Merge (FL p) Source # 

Methods

merge :: (FL p :\/: FL p) wX wY -> (FL p :/\: FL p) wX wY Source #

Merge p => Merge (LabelledPatch p) Source # 
Merge p => Merge (Named p) Source # 

Methods

merge :: (Named p :\/: Named p) wX wY -> (Named p :/\: Named p) wX wY Source #

PrimPatch prim => Merge (RepoPatchV2 prim) Source # 

Methods

merge :: (RepoPatchV2 prim :\/: RepoPatchV2 prim) wX wY -> (RepoPatchV2 prim :/\: RepoPatchV2 prim) wX wY Source #

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

Methods

merge :: (WrappedNamed rt p :\/: WrappedNamed rt p) wX wY -> (WrappedNamed rt p :/\: WrappedNamed rt p) wX wY Source #

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

Methods

merge :: (PatchInfoAnd rt p :\/: PatchInfoAnd rt p) wX wY -> (PatchInfoAnd rt p :/\: PatchInfoAnd rt p) wX wY Source #

mergeFL :: Merge p => (p :\/: FL p) wX wY -> (FL p :/\: p) wX wY Source #

naturalMerge :: (Invert p, Commute p) => (p :\/: p) wX wY -> Maybe ((p :/\: p) wX wY) Source #

The natural, non-conflicting merge.

Properties

prop_mergeSymmetric :: (Eq2 p, Merge p) => (p :\/: p) wX wY -> Bool Source #

prop_mergeCommute :: (Eq2 p, Merge p) => (p :\/: p) wX wY -> Bool Source #