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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Repair

Synopsis

- class Repair p where
- class Apply p => RepairToFL p where
- mapMaybeSnd :: (a -> b) -> Maybe (c, a) -> Maybe (c, b)
- class Check p where

# 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.

Minimal complete definition

applyAndTryToFix

Methods

applyAndTryToFix :: ApplyMonad (ApplyState p) m => p wX wY -> m (Maybe (String, p wX wY)) #

Instances

RepairToFL p => Repair (FL p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m (Maybe (String, FL p wX wY)) #
RepairToFL p => Repair (Named p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m (Maybe (String, Named p wX wY)) #
Apply p => Repair (Suspended p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m (Maybe (String, Suspended p wX wY)) #
RepairToFL p => Repair (WrappedNamed rt p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (WrappedNamed rt p)) m => WrappedNamed rt p wX wY -> m (Maybe (String, WrappedNamed rt p wX wY)) #
RepairToFL p => Repair (PatchInfoAnd rt p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m (Maybe (String, PatchInfoAnd rt p wX wY)) #

class Apply p => RepairToFL p where #

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

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState p) m => p wX wY -> m (Maybe (String, FL p wX wY)) #

Instances

RepairToFL DummyPatch # |
Methods applyAndTryToFixFL :: ApplyMonad (ApplyState DummyPatch) m => DummyPatch wX wY -> m (Maybe (String, FL DummyPatch wX wY)) #
Apply p => RepairToFL (Suspended p) # |
Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m (Maybe (String, FL (Suspended p) wX wY)) #
PrimPatch prim => RepairToFL (RepoPatchV2 prim) # |
Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m (Maybe (String, FL (RepoPatchV2 prim) wX wY)) #

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

class Check p where #

Methods

isInconsistent :: p wX wY -> Maybe Doc #

Instances

Check DummyPatch # |
Methods isInconsistent :: DummyPatch wX wY -> Maybe Doc #
Check p => Check (RL p) # |
Methods isInconsistent :: RL p wX wY -> Maybe Doc #
Check p => Check (FL p) # |
Methods isInconsistent :: FL p wX wY -> Maybe Doc #
Check (RepoPatchV1 prim) # |
Methods isInconsistent :: RepoPatchV1 prim wX wY -> Maybe Doc #
Check p => Check (Named p) # |
Methods isInconsistent :: Named p wX wY -> Maybe Doc #
Check p => Check (RebaseItem p) # |
Methods isInconsistent :: RebaseItem p wX wY -> Maybe Doc #
Check p => Check (Suspended p) # |
Methods isInconsistent :: Suspended p wX wY -> Maybe Doc #
PrimPatch prim => Check (RepoPatchV2 prim) # |
Methods isInconsistent :: RepoPatchV2 prim wX wY -> Maybe Doc #
Check p => Check (WrappedNamed rt p) # |
Methods isInconsistent :: WrappedNamed rt p wX wY -> Maybe Doc #