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

Safe HaskellNone
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 Source #

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
Eq PrimPatchId Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

Ord PrimPatchId Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

Show PrimPatchId Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

StorableId PrimPatchId Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

SignedId PrimPatchId Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

FromPrim (RepoPatchV3 prim) Source # 
Instance details

Defined in Darcs.Patch.V3

Methods

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

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

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

type PatchId (NamedPrim p) Source # 
Instance details

Defined in Darcs.Patch.Prim.Named

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

positivePrimPatchIds :: PatchInfo -> [PrimPatchId] Source #

Create an infinite list of positive PrimPatchIds.

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

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

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