drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Reference

Description

Defines a type used to hold referencing information.

Synopsis

Type

data Reference Source #

A Reference contains the identifier (UID), a reference address (LblType), a human-readable shortname (ShortName), and any extra information about the reference (RefInfo).

Instances

Instances details
HasRefAddress Reference Source #

Finds the reference address contained in a Reference (through a LblType).

Instance details

Defined in Language.Drasil.Reference

HasShortName Reference Source #

Finds the shortname of the reference address used for the Reference.

Instance details

Defined in Language.Drasil.Reference

HasUID Reference Source #

Finds the UID of a Reference.

Instance details

Defined in Language.Drasil.Reference

Methods

uid :: Lens' Reference UID Source #

Eq Reference Source #

Equal if UIDs are equal.

Instance details

Defined in Language.Drasil.Reference

Class

class HasReference c where Source #

A class that contains a list of References.

Methods

getReferences :: Lens' c [Reference] Source #

Provides a Lens to the 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 #

Takes the reference UID and wraps it into a Sentence.

namedRef :: (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence -> Sentence Source #

Takes a Reference with a name to be displayed and wraps it into a Sentence. Does not overwrite the shortname contained in the reference, but will only display as the given Sentence.

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 #

Takes a Reference with a name to be displayed and any additional information and wraps it into a Sentence. Does not overwrite the shortname contained in the reference, but will only display as the given Sentence along with the given RefInfo.