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

Copyright2002-2005 David Roundy
LicenseGPL
Maintainerdarcs-devel@darcs.net
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Apply

Description

 

Synopsis

Documentation

class Apply p where Source #

Minimal complete definition

apply

Associated Types

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

Methods

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

Instances

Apply DummyPatch Source # 

Associated Types

type ApplyState (DummyPatch :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState DummyPatch) m => DummyPatch wX wY -> m () Source #

Apply p => Apply (RL p) Source # 

Associated Types

type ApplyState (RL p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

Apply p => Apply (FL p) Source # 

Associated Types

type ApplyState (FL p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

Apply p => Apply (Named p) Source # 

Associated Types

type ApplyState (Named p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

Apply p => Apply (RebaseName p) Source # 

Associated Types

type ApplyState (RebaseName p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

(PrimPatchBase p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseFixup p) Source # 

Associated Types

type ApplyState (RebaseFixup p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

Apply p => Apply (Suspended p) Source # 

Associated Types

type ApplyState (Suspended p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

PrimPatch prim => Apply (RepoPatchV2 prim) Source # 

Associated Types

type ApplyState (RepoPatchV2 prim :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () Source #

(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseChange p) Source # 

Associated Types

type ApplyState (RebaseChange p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseSelect p) Source # 

Associated Types

type ApplyState (RebaseSelect p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

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

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

Associated Types

type ApplyState (WrappedNamed rt p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (WrappedNamed rt p)) m => WrappedNamed rt p wX wY -> m () Source #

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

Associated Types

type ApplyState (PatchInfoAnd rt p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m () Source #

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

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) Source #

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

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]) Source #

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] Source #