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

Safe HaskellNone

Darcs.Patch.Named.Wrapped

Synopsis

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 

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

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