| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Document.Reference
Contents
Description
Defines a type used to hold referencing information.
Synopsis
- data Reference = Reference UID LblType ShortName
- class HasReference c where
- getReferences :: Lens' c [Reference]
- ref :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Reference
- refS :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence
- namedRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence -> Sentence
- complexRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> RefInfo -> Sentence
- namedComplexRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence -> RefInfo -> Sentence
Type
A Reference contains the identifier (UID), a reference address (LblType),
a human-readable shortname (ShortName), and any extra information about the reference (RefInfo).
Instances
Class
class HasReference c where Source #
A class that contains a list of References.
Constructors
ref :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Reference Source #
Projector function that creates a Reference from something Referable.
refS :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence Source #
namedRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence -> Sentence Source #
complexRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> RefInfo -> Sentence Source #
Takes a Reference with additional display info. Uses the internal shortname for its display name.
namedComplexRef :: (IsChunk r, HasRefAddress r, HasShortName r) => r -> Sentence -> RefInfo -> Sentence Source #