Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
).
Class
class HasReference c where Source #
A class that contains a list of Reference
s.
getReferences :: Lens' c [Reference] Source #
Provides a Lens
to the Reference
s.
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 #