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

Portability | portable
Stability | experimental
Maintainer | darcs-devel@darcs.net
Safe Haskell | None

Darcs.Patch.Apply

Description

Synopsis

- class Apply p where
  - type ApplyState p :: (* -> *) -> *
  - apply :: ApplyMonad m (ApplyState p) => p x y -> m ()
- applyToFilePaths :: (Apply p, ApplyState p ~ Tree) => p x y -> Maybe [(FilePath, FilePath)] -> [FilePath] -> ([FilePath], [FilePath], [(FilePath, FilePath)])
- applyToTree :: (Apply p, Functor m, Monad m, ApplyState p ~ Tree) => p x y -> Tree m -> m (Tree m)
- applyToState :: forall p m x y. (Apply p, ApplyMonadTrans m (ApplyState p)) => p x y -> ApplyState p m -> m (ApplyState p m)
- effectOnFilePaths :: (Apply p, ApplyState p ~ Tree) => p x y -> [FilePath] -> [FilePath]

# Documentation

class Apply p where

Associated Types

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

Methods

apply :: ApplyMonad m (ApplyState p) => p x y -> m ()

Instances

Apply Prim |
Apply Prim |
Apply DummyPatch |
Apply p => Apply (RL p) |
Apply p => Apply (FL p) |
PrimPatch prim => Apply (Patch prim) |
Apply p => Apply (Named p) |
Apply p => Apply (PatchInfoAnd p) |
PrimPatch prim => Apply (RealPatch prim) |

applyToFilePaths :: (Apply p, ApplyState p ~ Tree) => p x y -> Maybe [(FilePath, FilePath)] -> [FilePath] -> ([FilePath], [FilePath], [(FilePath, FilePath)])

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

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

applyToState :: forall p m x y. (Apply p, ApplyMonadTrans m (ApplyState p)) => p x y -> ApplyState p m -> m (ApplyState p m)

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