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

Darcs.Patch.Object

Synopsis

Documentation

type family ObjectIdOf (state :: (* -> *) -> *) Source #

Given a state type (parameterized over a monad m :: * -> *), this gives us the type of the key with which we can lookup an item (or object) in the state.

Instances

Instances details
type ObjectIdOf ObjectMap Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.ObjectMap

type ObjectIdOf Tree Source # 
Instance details

Defined in Darcs.Patch.Object

class Eq oid => ObjectId oid where Source #

We require from such a key (an ObjectId) that it has a canonical way to format itself to a Doc. For historical reasons, this takes a parameter of type FileNameFormat.

Instances

Instances details
ObjectId AnchoredPath Source # 
Instance details

Defined in Darcs.Patch.Object

formatFileName :: FileNameFormat -> AnchoredPath -> Doc Source #

Format a AnchoredPath to a Doc according to the given FileNameFormat.

NOTE: This is not only used for display but also to format patch files. This is why we have to do the white space encoding here. See writePatchIfNecessary.

Besides white space encoding, for FileNameFormatV2 we just pack it into a Doc. For FileNameFormatV1 we must emulate the non-standard darcs-1 encoding of file paths: it is an UTF8 encoding of the raw byte stream, interpreted as code points.

See also readFileName.