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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Repair

Synopsis

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

# Documentation

class Repair (p :: Type -> Type -> Type) 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 (ApplyState p) m => p wX wY -> m (Maybe (String, p wX wY)) #

#### Instances

Instances details

RepairToFL p => Repair (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods applyAndTryToFix :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m (Maybe (String, Named p wX wY)) #
RepairToFL p => Repair (PatchInfoAnd p) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods applyAndTryToFix :: ApplyMonad (ApplyState (PatchInfoAnd p)) m => PatchInfoAnd p wX wY -> m (Maybe (String, PatchInfoAnd p wX wY)) #
RepairToFL p => Repair (FL p) # |
Instance details Defined in Darcs.Patch.Repair Methods applyAndTryToFix :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m (Maybe (String, FL p wX wY)) #

class Apply p => RepairToFL (p :: Type -> Type -> Type) 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.

Minimal complete definition

Nothing

Methods

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

#### Instances

Instances details

RepairToFL Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply Methods applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) #
RepairToFL Prim # |
Instance details Defined in Darcs.Patch.Prim.V1.Apply Methods applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) #
RepairToFL Prim # |
Instance details Defined in Darcs.Patch.V1.Prim Methods applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) #
RepairToFL Prim # |
Instance details Defined in Darcs.Patch.V2.Prim Methods applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) #
PrimPatch prim => RepairToFL (RepoPatchV1 prim) # |
Instance details Defined in Darcs.Patch.V1.Apply Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV1 prim)) m => RepoPatchV1 prim wX wY -> m (Maybe (String, FL (RepoPatchV1 prim) wX wY)) #
PrimPatch prim => RepairToFL (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m (Maybe (String, FL (RepoPatchV2 prim) wX wY)) #
Apply p => RepairToFL (PrimWithName name p) # |
Instance details Defined in Darcs.Patch.Prim.WithName Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (PrimWithName name p)) m => PrimWithName name p wX wY -> m (Maybe (String, FL (PrimWithName name p) wX wY)) #
PrimPatch prim => RepairToFL (RepoPatchV3 name prim) # |
Instance details Defined in Darcs.Patch.V3.Core Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m (Maybe (String, FL (RepoPatchV3 name prim) wX wY)) #

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

class Check (p :: Type -> Type -> Type) where #

Minimal complete definition

Nothing

Methods

isInconsistent :: p wX wY -> Maybe Doc #

#### Instances

Instances details

Check p => Check (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods isInconsistent :: Named p wX wY -> Maybe Doc #
Check (RepoPatchV1 prim) # |
Instance details Defined in Darcs.Patch.V1.Core Methods isInconsistent :: RepoPatchV1 prim wX wY -> Maybe Doc #
PrimPatch prim => Check (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods isInconsistent :: RepoPatchV2 prim wX wY -> Maybe Doc #
Check p => Check (FL p) # |
Instance details Defined in Darcs.Patch.Repair Methods isInconsistent :: FL p wX wY -> Maybe Doc #
Check p => Check (RL p) # |
Instance details Defined in Darcs.Patch.Repair Methods isInconsistent :: RL p wX wY -> Maybe Doc #
PrimPatch prim => Check (RepoPatchV3 name prim) # |
Instance details Defined in Darcs.Patch.V3.Core Methods isInconsistent :: RepoPatchV3 name prim wX wY -> Maybe Doc #