darcs-2.16.4: 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 #

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

default unapply :: (ApplyMonad (ApplyState p) m, Invert p) => p wX wY -> m () Source #

Instances

Instances details
Apply Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Apply

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply p => Apply (RL p) Source # 
Instance details

Defined in Darcs.Patch.Apply

Associated Types

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

Methods

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

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

Apply p => Apply (FL p) Source # 
Instance details

Defined in Darcs.Patch.Apply

Associated Types

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

Methods

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

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

PrimPatch prim => Apply (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Apply

Associated Types

type ApplyState (RepoPatchV1 prim) :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState (RepoPatchV1 prim)) m => RepoPatchV1 prim wX wY -> m () Source #

PrimPatch prim => Apply (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Associated Types

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

Methods

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

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

Apply p => Apply (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Associated Types

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

Methods

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

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

Apply prim => Apply (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Associated Types

type ApplyState (RebaseFixup prim) :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState (RebaseFixup prim)) m => RebaseFixup prim wX wY -> m () Source #

Apply prim => Apply (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type ApplyState (RebaseChange prim) :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState (RebaseChange prim)) m => RebaseChange prim wX wY -> m () Source #

Apply p => Apply (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Associated Types

type ApplyState (Invertible p) :: (Type -> Type) -> Type Source #

Methods

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

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

Apply p => Apply (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Associated Types

type ApplyState (PatchInfoAndG rt p) :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState (PatchInfoAndG rt p)) m => PatchInfoAndG rt p wX wY -> m () Source #

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

Defined in Darcs.Patch.Named.Wrapped

Associated Types

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

Methods

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

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

Apply p => Apply (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Associated Types

type ApplyState (PrimWithName name p) :: (Type -> Type) -> Type Source #

Methods

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

unapply :: ApplyMonad (ApplyState (PrimWithName name p)) m => PrimWithName name p wX wY -> m () Source #

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

Defined in Darcs.Patch.V3.Core

Associated Types

type ApplyState (RepoPatchV3 name prim) :: (Type -> Type) -> Type Source #

Methods

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

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

applyToTree :: (Apply p, 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 patch to a Tree. If the apply fails, we return Nothing, otherwise we return the updated Tree.