darcs-2.18.5: a distributed, interactive, smart revision control system
Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.V3.Core

Description

Conflictors a la camp.

Similar to the camp paper, but with a few differences:

  • no reverse conflictors and no Invert instance
  • instead we directly implement cleanMerge
  • minor details of merge and commute due to bug fixes

The proofs in this module assume that whenever we create a conflictor we maintain the following invariants:

  1. A conflictor reverts a patch in its context iff it is the first patch that conflicts with it. This implies that any patch a conflictor reverts exists in its context as an unconflicted Prim.
  2. If v depends on u and p conflicts with u then it also conflicts with v.
Synopsis

Documentation

data RepoPatchV3 name (prim :: Type -> Type -> Type) wX wY where #

Constructors

Prim :: forall name (prim :: Type -> Type -> Type) wX wY. PrimWithName name prim wX wY -> RepoPatchV3 name prim wX wY 
Conflictor 

Fields

Instances

Instances details
FromPrim (RepoPatchV3 prim) # 
Instance details

Defined in Darcs.Patch.V3

Methods

fromAnonymousPrim :: PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY #

fromPrim :: PatchId (RepoPatchV3 prim) -> PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY #

fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV3 prim)) wX wY -> FL (RepoPatchV3 prim) wX wY #

PrimPatch prim => Apply (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Associated Types

type ApplyState (RepoPatchV3 name prim) 
Instance details

Defined in Darcs.Patch.V3.Core

type ApplyState (RepoPatchV3 name prim) = ApplyState prim

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m () #

unapply :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m () #

(SignedId name, StorableId name, PrimPatch prim) => Commute (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

commute :: (RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY -> Maybe ((RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY) #

(SignedId name, StorableId name, PrimPatch prim) => CommuteNoConflicts (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

commuteNoConflicts :: (RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY -> Maybe ((RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY) #

(SignedId name, StorableId name, PrimPatch prim) => Conflict (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Resolution

Methods

isConflicted :: RepoPatchV3 name prim wX wY -> Bool #

resolveConflicts :: RL (RepoPatchV3 name prim) wO wX -> RL (RepoPatchV3 name prim) wX wY -> [ConflictDetails (PrimOf (RepoPatchV3 name prim)) wY] #

PatchDebug prim => PatchDebug (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

patchDebugDummy :: RepoPatchV3 name prim wX wY -> () #

Effect (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

effect :: RepoPatchV3 name prim wX wY -> FL (PrimOf (RepoPatchV3 name prim)) wX wY #

IsHunk prim => IsHunk (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

isHunk :: RepoPatchV3 name prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RepoPatchV3 name prim)) wX wY) #

PatchListFormat (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

patchListFormat :: ListFormat (RepoPatchV3 name prim) #

PrimPatch prim => PrimPatchBase (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Associated Types

type PrimOf (RepoPatchV3 name prim) 
Instance details

Defined in Darcs.Patch.V3.Core

type PrimOf (RepoPatchV3 name prim) = prim
ToPrim (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

toPrim :: RepoPatchV3 name prim wX wY -> Maybe (PrimOf (RepoPatchV3 name prim) wX wY) #

SignedId name => Ident (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

ident :: RepoPatchV3 name prim wX wY -> PatchId (RepoPatchV3 name prim) #

PatchInspect prim => PatchInspect (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

listTouchedFiles :: RepoPatchV3 name prim wX wY -> [AnchoredPath] #

hunkMatches :: (ByteString -> Bool) -> RepoPatchV3 name prim wX wY -> Bool #

(SignedId name, StorableId name, PrimPatch prim) => CleanMerge (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

cleanMerge :: (RepoPatchV3 name prim :\/: RepoPatchV3 name prim) wX wY -> Maybe ((RepoPatchV3 name prim :/\: RepoPatchV3 name prim) wX wY) #

(SignedId name, StorableId name, PrimPatch prim) => Merge (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

merge :: (RepoPatchV3 name prim :\/: RepoPatchV3 name prim) wX wY -> (RepoPatchV3 name prim :/\: RepoPatchV3 name prim) wX wY #

(SignedId name, StorableId name, PrimPatch prim) => ReadPatch (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

readPatch' :: Parser (Sealed (RepoPatchV3 name prim wX)) #

PrimPatch prim => Check (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

isInconsistent :: RepoPatchV3 name prim wX wY -> Maybe Doc #

PrimPatch prim => RepairToFL (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m (Maybe (String, FL (RepoPatchV3 name prim) wX wY)) #

(SignedId name, StorableId name, PrimPatch prim) => ShowContextPatch (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showPatchWithContextAndApply :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => ShowPatchFor -> RepoPatchV3 name prim wX wY -> m Doc #

(SignedId name, StorableId name, PrimPatch prim) => ShowPatch (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

content :: RepoPatchV3 name prim wX wY -> Doc #

description :: RepoPatchV3 name prim wX wY -> Doc #

summary :: RepoPatchV3 name prim wX wY -> Doc #

summaryFL :: FL (RepoPatchV3 name prim) wX wY -> Doc #

thing :: RepoPatchV3 name prim wX wY -> String #

things :: RepoPatchV3 name prim wX wY -> String #

(SignedId name, StorableId name, PrimPatch prim) => ShowPatchBasic (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showPatch :: ShowPatchFor -> RepoPatchV3 name prim wX wY -> Doc #

Summary (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

conflictedEffect :: RepoPatchV3 name prim wX wY -> [IsConflictedPrim (PrimOf (RepoPatchV3 name prim))] #

(Invert prim, Commute prim, Eq2 prim) => Unwind (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

fullUnwind :: RepoPatchV3 name prim wX wY -> Unwound (PrimOf (RepoPatchV3 name prim)) wX wY #

(SignedId name, Eq2 prim, Commute prim) => Eq2 (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

unsafeCompare :: RepoPatchV3 name prim wA wB -> RepoPatchV3 name prim wC wD -> Bool #

(=\/=) :: RepoPatchV3 name prim wA wB -> RepoPatchV3 name prim wA wC -> EqCheck wB wC #

(=/\=) :: RepoPatchV3 name prim wA wC -> RepoPatchV3 name prim wB wC -> EqCheck wA wB #

(Show name, Show2 prim) => Show2 (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showDict2 :: ShowDict (RepoPatchV3 name prim wX wY) #

(Show name, Show2 prim) => Show1 (RepoPatchV3 name prim wX) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showDict1 :: Dict (Show (RepoPatchV3 name prim wX wX0)) #

(Show name, Show2 prim) => Show (RepoPatchV3 name prim wX wY) # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showsPrec :: Int -> RepoPatchV3 name prim wX wY -> ShowS #

show :: RepoPatchV3 name prim wX wY -> String #

showList :: [RepoPatchV3 name prim wX wY] -> ShowS #

type ApplyState (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

type ApplyState (RepoPatchV3 name prim) = ApplyState prim
type PrimOf (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

type PrimOf (RepoPatchV3 name prim) = prim
type PatchId (RepoPatchV3 name prim) # 
Instance details

Defined in Darcs.Patch.V3.Core

type PatchId (RepoPatchV3 name prim) = name

pattern PrimP :: TestOnly => PrimWithName name prim wX wY -> RepoPatchV3 name prim wX wY #

pattern ConflictorP :: TestOnly => FL (PrimWithName name prim) wX wY -> Set (Contexted (PrimWithName name prim) wY) -> Contexted (PrimWithName name prim) wY -> RepoPatchV3 name prim wX wY #

(+|) :: Ord a => a -> Set a -> Set a infixr 9 #

A handy synonym for insert.

(-|) :: Ord a => a -> Set a -> Set a infixr 9 #

A handy synonym for delete.