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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Repair

Synopsis

Documentation

class Repair p where Source #

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

Instances

RepairToFL p => Repair (FL p) Source # 

Methods

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

RepairToFL p => Repair (Named p) Source # 

Methods

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

Repair (Suspended p) Source # 

Methods

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

RepairToFL p => Repair (WrappedNamed rt p) Source # 

Methods

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

RepairToFL p => Repair (PatchInfoAnd rt p) Source # 

Methods

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

class Apply p => RepairToFL p where Source #

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

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

class Check p where Source #

Methods

isInconsistent :: p wX wY -> Maybe Doc Source #

Instances

Check DummyPatch Source # 
Check p => Check (RL p) Source # 

Methods

isInconsistent :: RL p wX wY -> Maybe Doc Source #

Check p => Check (FL p) Source # 

Methods

isInconsistent :: FL p wX wY -> Maybe Doc Source #

Check (RepoPatchV1 prim) Source # 

Methods

isInconsistent :: RepoPatchV1 prim wX wY -> Maybe Doc Source #

Check p => Check (Named p) Source # 

Methods

isInconsistent :: Named p wX wY -> Maybe Doc Source #

Check p => Check (RebaseItem p) Source # 

Methods

isInconsistent :: RebaseItem p wX wY -> Maybe Doc Source #

Check p => Check (Suspended p) Source # 

Methods

isInconsistent :: Suspended p wX wY -> Maybe Doc Source #

PrimPatch prim => Check (RepoPatchV2 prim) Source # 

Methods

isInconsistent :: RepoPatchV2 prim wX wY -> Maybe Doc Source #

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

Methods

isInconsistent :: WrappedNamed rt p wX wY -> Maybe Doc Source #