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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Named.Wrapped

Synopsis

- data WrappedNamed rt p wX wY where
  - NormalP :: !(Named p wX wY) -> WrappedNamed rt p wX wY
  - RebaseP :: (PrimPatchBase p, FromPrim p, Effect p) => !PatchInfo -> !(Suspended p wX wX) -> WrappedNamed (RepoType IsRebase) p wX wX
- patch2patchinfo :: WrappedNamed rt p wX wY -> PatchInfo
- activecontents :: WrappedNamed rt p wX wY -> FL p wX wY
- infopatch :: PatchInfo -> FL p wX wY -> WrappedNamed rt p wX wY
- namepatch :: String -> String -> String -> [String] -> FL p wX wY -> IO (WrappedNamed rt p wX wY)
- anonymous :: FL p wX wY -> IO (WrappedNamed rt p wX wY)
- getdeps :: WrappedNamed rt p wX wY -> [PatchInfo]
- adddeps :: WrappedNamed rt p wX wY -> [PatchInfo] -> WrappedNamed rt p wX wY
- mkRebase :: (PrimPatchBase p, FromPrim p, Effect p) => Suspended p wX wX -> IO (WrappedNamed (RepoType IsRebase) p wX wX)
- toRebasing :: Named p wX wY -> WrappedNamed (RepoType IsRebase) p wX wY
- fromRebasing :: WrappedNamed (RepoType IsRebase) p wX wY -> Named p wX wY
- runInternalChecker :: InternalChecker p -> forall wX wY. p wX wY -> EqCheck wX wY
- namedInternalChecker :: forall rt p. IsRepoType rt => Maybe (InternalChecker (WrappedNamed rt p))
- namedIsInternal :: IsRepoType rt => WrappedNamed rt p wX wY -> EqCheck wX wY
- removeInternalFL :: IsRepoType rt => FL (WrappedNamed rt p) wX wY -> FL (Named p) wX wY
- fmapFL_WrappedNamed :: (FL p wA wB -> FL q wA wB) -> ((RebaseTypeOf rt :~~: IsRebase) -> p :~: q) -> WrappedNamed rt p wA wB -> WrappedNamed rt q wA wB
- data a :~: b where
  - ReflPatch :: a :~: a
- data a :~~: b where
  - ReflRebaseType :: a :~~: a
- generaliseRepoTypeWrapped :: WrappedNamed (RepoType NoRebase) p wA wB -> WrappedNamed rt p wA wB

# Documentation

data WrappedNamed rt p wX wY where #

A layer inbetween the 'Named p' type and 'PatchInfoAnd p' design for holding "internal" patches such as the rebase container. Ideally these patches would be stored at the repository level but this would require some significant refactoring/cleaning up of that code.

Constructors

NormalP :: !(Named p wX wY) -> WrappedNamed rt p wX wY |
RebaseP :: (PrimPatchBase p, FromPrim p, Effect p) => !PatchInfo -> !(Suspended p wX wX) -> WrappedNamed (RepoType IsRebase) p wX wX |

Instances

Show2 p => Show2 (WrappedNamed rt p) # |
Methods showDict2 :: ShowDict (WrappedNamed rt p wX wY) #
PatchListFormat (WrappedNamed rt p) # |
Methods patchListFormat :: ListFormat (WrappedNamed rt p) #
Commute p => Commute (WrappedNamed rt p) # |
Methods commute :: (WrappedNamed rt p :> WrappedNamed rt p) wX wY -> Maybe ((WrappedNamed rt p :> WrappedNamed rt p) wX wY) #
PatchInspect p => PatchInspect (WrappedNamed rt p) # |
Methods listTouchedFiles :: WrappedNamed rt p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> WrappedNamed rt p wX wY -> Bool #
Invert p => Invert (WrappedNamed rt p) # |
Methods invert :: WrappedNamed rt p wX wY -> WrappedNamed rt p wY wX #
Merge p => Merge (WrappedNamed rt p) # |
Methods merge :: (WrappedNamed rt p :\/: WrappedNamed rt p) wX wY -> (WrappedNamed rt p :/\: WrappedNamed rt p) wX wY #
(ReadPatch p, PrimPatchBase p, FromPrim p, Effect p, PatchListFormat p, IsRepoType rt) => ReadPatch (WrappedNamed rt p) # |
Methods readPatch' :: ParserM m => m (Sealed (WrappedNamed rt p wX)) #
Apply p => Apply (WrappedNamed rt p) # |
Associated Types type ApplyState (WrappedNamed rt p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (WrappedNamed rt p)) m => WrappedNamed rt p wX wY -> m () #
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)) #
Check p => Check (WrappedNamed rt p) # |
Methods isInconsistent :: WrappedNamed rt p wX wY -> Maybe Doc #
(ShowPatch p, PatchListFormat p, Apply p, PrimPatchBase p, IsHunk p, Conflict p, CommuteNoConflicts p) => ShowPatch (WrappedNamed rt p) # |
Methods showNicely :: WrappedNamed rt p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (WrappedNamed rt p)) m) => WrappedNamed rt p wX wY -> m Doc # description :: WrappedNamed rt p wX wY -> Doc # summary :: WrappedNamed rt p wX wY -> Doc # summaryFL :: FL (WrappedNamed rt p) wX wY -> Doc # thing :: WrappedNamed rt p wX wY -> String # things :: WrappedNamed rt p wX wY -> String #
(ShowPatchBasic p, PatchListFormat p) => ShowPatchBasic (WrappedNamed rt p) # |
Methods showPatch :: WrappedNamed rt p wX wY -> Doc #
IsHunk (WrappedNamed rt p) # |
Methods isHunk :: WrappedNamed rt p wX wY -> Maybe (FileHunk wX wY) #
PrimPatchBase p => PrimPatchBase (WrappedNamed rt p) # |
Associated Types type PrimOf (WrappedNamed rt p :: * -> * -> *) :: * -> * -> * #
Effect p => Effect (WrappedNamed rt p) # |
Methods effect :: WrappedNamed rt p wX wY -> FL (PrimOf (WrappedNamed rt p)) wX wY # effectRL :: WrappedNamed rt p wX wY -> RL (PrimOf (WrappedNamed rt p)) wX wY #
(CommuteNoConflicts p, Conflict p) => Conflict (WrappedNamed rt p) # |
Methods resolveConflicts :: WrappedNamed rt p wX wY -> [[Sealed (FL (PrimOf (WrappedNamed rt p)) wY)]] # conflictedEffect :: WrappedNamed rt p wX wY -> [IsConflictedPrim (PrimOf (WrappedNamed rt p))] #
Show2 p => Show1 (WrappedNamed rt p wX) # |
Methods showDict1 :: ShowDict (WrappedNamed rt p wX wX) #
Show2 p => Show (WrappedNamed rt p wX wY) # |
Methods showsPrec :: Int -> WrappedNamed rt p wX wY -> ShowS # show :: WrappedNamed rt p wX wY -> String # showList :: [WrappedNamed rt p wX wY] -> ShowS #
type ApplyState (WrappedNamed rt p) # |
type ApplyState (WrappedNamed rt p) = ApplyState p
type PrimOf (WrappedNamed rt p) # |
type PrimOf (WrappedNamed rt p) = PrimOf p

patch2patchinfo :: WrappedNamed rt p wX wY -> PatchInfo #

activecontents :: WrappedNamed rt p wX wY -> FL p wX wY #

Return a list of the underlying patches that are actually `active` in the repository, i.e. not suspended as part of a rebase

infopatch :: PatchInfo -> FL p wX wY -> WrappedNamed rt p wX wY #

namepatch :: String -> String -> String -> [String] -> FL p wX wY -> IO (WrappedNamed rt p wX wY) #

anonymous :: FL p wX wY -> IO (WrappedNamed rt p wX wY) #

getdeps :: WrappedNamed rt p wX wY -> [PatchInfo] #

adddeps :: WrappedNamed rt p wX wY -> [PatchInfo] -> WrappedNamed rt p wX wY #

mkRebase :: (PrimPatchBase p, FromPrim p, Effect p) => Suspended p wX wX -> IO (WrappedNamed (RepoType IsRebase) p wX wX) #

toRebasing :: Named p wX wY -> WrappedNamed (RepoType IsRebase) p wX wY #

fromRebasing :: WrappedNamed (RepoType IsRebase) p wX wY -> Named p wX wY #

runInternalChecker :: InternalChecker p -> forall wX wY. p wX wY -> EqCheck wX wY #

namedInternalChecker :: forall rt p. IsRepoType rt => Maybe (InternalChecker (WrappedNamed rt p)) #

Is the given `WrappedNamed` patch an internal implementation detail that shouldn't be visible in the UI or included in tags/matchers etc? Two-level checker for efficiency: if the value of this is `Nothing` for a given patch type then there's no need to inspect patches of this type at all, as none of them can be internal.

namedIsInternal :: IsRepoType rt => WrappedNamed rt p wX wY -> EqCheck wX wY #

Is the given `WrappedNamed` patch an internal implementation detail that shouldn't be visible in the UI or included in tags/matchers etc?

removeInternalFL :: IsRepoType rt => FL (WrappedNamed rt p) wX wY -> FL (Named p) wX wY #

fmapFL_WrappedNamed #

Arguments

:: (FL p wA wB -> FL q wA wB) |
-> ((RebaseTypeOf rt :~~: IsRebase) -> p :~: q) | If the patch might be a rebase container patch, then `p` and `q` must be the same type, as no transformation is applied. This function provides a witness to this requirement: if 'RebaseTypeOf rt' might be `IsRebase`, then it must be able to return a proof that `p` and `q` are equal. If 'RebaseTypeOf rt' must be `NoRebase`, then this function can never be called with a valid value.
-> WrappedNamed rt p wA wB |
-> WrappedNamed rt q wA wB |

lift a function over an `FL` of patches to one over a 'WrappedNamed rt'. The function is only applied to "normal" patches, and any rebase container patch is left alone.

data a :~: b where #

Constructors

ReflPatch :: a :~: a |

data a :~~: b where #

Constructors

ReflRebaseType :: a :~~: a |

generaliseRepoTypeWrapped :: WrappedNamed (RepoType NoRebase) p wA wB -> WrappedNamed rt p wA wB #