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

Safe Haskell | None

Darcs.Patch.Repair

Synopsis

- class Repair p where
  - applyAndTryToFix :: ApplyMonad m (ApplyState p) => p x y -> m (Maybe (String, p x y))
- class Apply p => RepairToFL p where
  - applyAndTryToFixFL :: ApplyMonad m (ApplyState p) => p x y -> m (Maybe (String, FL p x y))
- mapMaybeSnd :: (a -> b) -> Maybe (c, a) -> Maybe (c, b)
- class Check p where
  - isInconsistent :: p x y -> Maybe Doc

# Documentation

class Repair p where

`Repair` and `RepairToFL` deal with repairing old patches that were were written out due to bugs or that we no longer wish to support. `Repair` is implemented by collections of patches (FL, Named, PatchInfoAnd) that might need repairing.

Methods

applyAndTryToFix :: ApplyMonad m (ApplyState p) => p x y -> m (Maybe (String, p x y))

Instances

RepairToFL p => Repair (FL p) |
RepairToFL p => Repair (Named p) |
RepairToFL p => Repair (PatchInfoAnd p) |

class Apply p => RepairToFL p where

`RepairToFL` is implemented by single patches that can be repaired (Prim, Patch, RealPatch) There is a default so that patch types with no current legacy problems don't need to have an implementation.

Methods

applyAndTryToFixFL :: ApplyMonad m (ApplyState p) => p x y -> m (Maybe (String, FL p x y))

Instances

RepairToFL Prim |
RepairToFL Prim |
PrimPatch prim => RepairToFL (Patch prim) |
PrimPatch prim => RepairToFL (RealPatch prim) |

mapMaybeSnd :: (a -> b) -> Maybe (c, a) -> Maybe (c, b)

class Check p where

Methods

isInconsistent :: p x y -> Maybe Doc

Instances

Check p => Check (RL p) |
Check p => Check (FL p) |
Check (Patch prim) |
Check p => Check (Named p) |
PrimPatch prim => Check (RealPatch prim) |