| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.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 :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Reference
- refS :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence
- namedRef :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence -> Sentence
- complexRef :: (HasUID r, HasRefAddress r, HasShortName r) => r -> RefInfo -> Sentence
- namedComplexRef :: (HasUID 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
| HasChunkRefs Reference Source # | |
| HasUID Reference Source # | |
| HasRefAddress Reference Source # | Finds the reference address contained in a |
| HasShortName Reference Source # | Finds the shortname of the reference address used for the |
| Eq Reference Source # | Equal if |
Class
class HasReference c where Source #
A class that contains a list of References.
Constructors
ref :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Reference Source #
Projector function that creates a Reference from something Referable.
refS :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence Source #
namedRef :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence -> Sentence Source #
complexRef :: (HasUID 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 :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence -> RefInfo -> Sentence Source #