Safe Haskell | None |
---|---|
Language | Haskell2010 |
Darcs.Patch.Rebase.Name
Synopsis
- data RebaseName wX wY where
- AddName :: forall wX wY. PatchInfo -> RebaseName wX wY
- DelName :: forall wX wY. PatchInfo -> RebaseName wX wY
- Rename :: forall wX wY. PatchInfo -> PatchInfo -> RebaseName wX wY
- commuteNamePrim :: forall (prim :: Type -> Type -> Type) wX wY. (RebaseName :> prim) wX wY -> (prim :> RebaseName) wX wY
- commutePrimName :: forall (prim :: Type -> Type -> Type) wX wY. (prim :> RebaseName) wX wY -> (RebaseName :> prim) wX wY
- commuterIdNamed :: forall (p1 :: Type -> Type -> Type) (p2 :: Type -> Type -> Type). CommuteFn p1 p2 -> CommuteFn p1 (Named p2)
- commuterNamedId :: forall (p1 :: Type -> Type -> Type) (p2 :: Type -> Type -> Type). CommuteFn p1 p2 -> CommuteFn (Named p1) p2
- commuteNameNamed :: forall (p :: Type -> Type -> Type) wX wY. (RebaseName :> Named p) wX wY -> Maybe ((Named p :> RebaseName) wX wY)
- commuteNamedName :: forall (p :: Type -> Type -> Type) wX wY. (Named p :> RebaseName) wX wY -> Maybe ((RebaseName :> Named p) wX wY)
- pushFixupName :: PushFixupFn RebaseName RebaseName (FL RebaseName) (Maybe2 RebaseName)
Documentation
data RebaseName wX wY where #
A RebaseName
encapsulates the concept of the name of a patch,
without any contents. This allows us to track explicit dependencies
in the rebase state, changing them to follow uses of amend-record
or unsuspend on a depended-on patch, and warning the user if any
are lost entirely.
Constructors
AddName :: forall wX wY. PatchInfo -> RebaseName wX wY | |
DelName :: forall wX wY. PatchInfo -> RebaseName wX wY | |
Rename :: forall wX wY. PatchInfo -> PatchInfo -> RebaseName wX wY |
Instances
commuteNamePrim :: forall (prim :: Type -> Type -> Type) wX wY. (RebaseName :> prim) wX wY -> (prim :> RebaseName) wX wY #
Commute a RebaseName
and a primitive patch. They trivially
commute so this just involves changing the witnesses.
This is unsafe if the patch being commuted actually has a
name (e.g. Named or PatchInfo - PrimWithName is ok),
commutePrimName :: forall (prim :: Type -> Type -> Type) wX wY. (prim :> RebaseName) wX wY -> (RebaseName :> prim) wX wY #
Commute a primitive patch and a RebaseName
. They trivially
commute so this just involves changing the witnesses.
This is unsafe if the patch being commuted actually has a
name (e.g. Named or PatchInfo - PrimWithName is ok),
commuterIdNamed :: forall (p1 :: Type -> Type -> Type) (p2 :: Type -> Type -> Type). CommuteFn p1 p2 -> CommuteFn p1 (Named p2) #
Commute an unnamed patch with a named patch. This is unsafe if the second patch actually does have a name (e.g. Named, PatchInfoAnd, etc), as it won't check the explicit dependencies.
commuterNamedId :: forall (p1 :: Type -> Type -> Type) (p2 :: Type -> Type -> Type). CommuteFn p1 p2 -> CommuteFn (Named p1) p2 #
Commute an unnamed patch with a named patch. This is unsafe if the first patch actually does have a name (e.g. Named, PatchInfoAnd, etc), as it won't check the explicit dependencies.
commuteNameNamed :: forall (p :: Type -> Type -> Type) wX wY. (RebaseName :> Named p) wX wY -> Maybe ((Named p :> RebaseName) wX wY) #
Commute a name patch and a named patch. In most cases this is trivial but we do need to check explicit dependencies.
commuteNamedName :: forall (p :: Type -> Type -> Type) wX wY. (Named p :> RebaseName) wX wY -> Maybe ((RebaseName :> Named p) wX wY) #
Commute a named patch and a name patch. In most cases this is trivial but we do need to check explicit dependencies.