darcs-2.16.5: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Patch.Prim.Named

Description

Wrapper for prim patches to give them an identity derived from the identity of the containined Named patch.

Synopsis

Documentation

data PrimPatchId #

Signed patch identity. The SHA1 hash of the non-inverted meta data (PatchInfo) plus an Int for the sequence number within the named patch, starting with 1. The Int gets inverted together with the patch and must never be 0 else we could not distinguish between the patch and its inverse.

Instances

Instances details
Show PrimPatchId # 
Instance details

Defined in Darcs.Patch.Prim.Named

SignedId PrimPatchId # 
Instance details

Defined in Darcs.Patch.Prim.Named

StorableId PrimPatchId # 
Instance details

Defined in Darcs.Patch.Prim.Named

Eq PrimPatchId # 
Instance details

Defined in Darcs.Patch.Prim.Named

Ord PrimPatchId # 
Instance details

Defined in Darcs.Patch.Prim.Named

FromPrim (RepoPatchV3 prim) # 
Instance details

Defined in Darcs.Patch.V3

Methods

fromAnonymousPrim :: PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY #

fromPrim :: PatchId (RepoPatchV3 prim) -> PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY #

fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV3 prim)) wX wY -> FL (RepoPatchV3 prim) wX wY #

type PatchId (NamedPrim p) # 
Instance details

Defined in Darcs.Patch.Prim.Named

namedPrim :: PrimPatchId -> p wX wY -> NamedPrim p wX wY #

positivePrimPatchIds :: PatchInfo -> [PrimPatchId] #

Create an infinite list of positive PrimPatchIds.

anonymousNamedPrim :: p wX wY -> NamedPrim p wX wY #

unsafePrimPatchId :: TestOnly => Int -> SHA1 -> PrimPatchId #

This should only be used for testing, as it exposes the internal structure of a PrimPatchId.