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

Portabilityportable
Stabilityexperimental
Maintainerdarcs-devel@darcs.net
Safe HaskellNone

Darcs.Patch.Apply

Description

 

Synopsis

Documentation

class Apply p where

Associated Types

type ApplyState p :: (* -> *) -> *

Methods

apply :: ApplyMonad (ApplyState p) m => p wX wY -> m ()

Instances

Apply Prim 
Apply Prim 
Apply DummyPatch 
Apply p => Apply (RL p) 
Apply p => Apply (FL p) 
PrimPatch prim => Apply (RepoPatchV1 prim) 
Apply p => Apply (Named p) 
Apply p => Apply (RebaseName p) 
PrimPatch prim => Apply (RepoPatchV2 prim) 
(PrimPatchBase p, Apply p, ~ ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseFixup p) 
Apply p => Apply (Suspended p) 
(PrimPatchBase p, Invert p, Apply p, ~ ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseChange p) 
(PrimPatchBase p, Invert p, Apply p, ~ ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseSelect p) 
Apply p => Apply (WrappedNamed rt p) 
Apply p => Apply (PatchInfoAnd rt p) 

applyToTree :: (Apply p, Functor m, Monad m, ApplyState p ~ Tree) => p wX wY -> Tree m -> m (Tree m)

Apply a patch to a Tree, yielding a new Tree.

applyToState :: forall p m wX wY. (Apply p, ApplyMonadTrans (ApplyState p) m) => p wX wY -> ApplyState p m -> m (ApplyState p m)

maybeApplyToTree :: (Apply p, ApplyState p ~ Tree) => p wX wY -> Tree IO -> IO (Maybe (Tree IO))

Attempts to apply a given replace patch to a Tree. If the apply fails (if the file the patch applies to already contains the target token), we return Nothing, otherwise we return the updated Tree.

applyToFileMods :: (Apply p, ApplyState p ~ Tree) => p wX wY -> Set FileName -> (Set FileName, [PatchMod FileName])

Apply a patch to set of FileNames, yielding the new set of FileNames and PatchMods

effectOnFilePaths :: (Apply p, ApplyState p ~ Tree) => p wX wY -> [FilePath] -> [FilePath]