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

Language.Drasil.UID

Description

Unique Identifier used across Drasil.

Synopsis

Documentation

data UID Source #

A UID is a 'unique identifier' for things that we will put into our database of information. We use a newtype wrapper to make sure we are only using UIDs where desired.

Instances

Instances details
ToJSON UID Source # 
Instance details

Defined in Language.Drasil.UID

Methods

toJSON :: UID -> Value

toEncoding :: UID -> Encoding

toJSONList :: [UID] -> Value

toEncodingList :: [UID] -> Encoding

ToJSONKey UID Source # 
Instance details

Defined in Language.Drasil.UID

Methods

toJSONKey :: ToJSONKeyFunction UID

toJSONKeyList :: ToJSONKeyFunction [UID]

Generic UID Source # 
Instance details

Defined in Language.Drasil.UID

Associated Types

type Rep UID :: Type -> Type #

Methods

from :: UID -> Rep UID x #

to :: Rep UID x -> UID #

Show UID Source # 
Instance details

Defined in Language.Drasil.UID

Methods

showsPrec :: Int -> UID -> ShowS #

show :: UID -> String #

showList :: [UID] -> ShowS #

Eq UID Source # 
Instance details

Defined in Language.Drasil.UID

Methods

(==) :: UID -> UID -> Bool #

(/=) :: UID -> UID -> Bool #

Ord UID Source # 
Instance details

Defined in Language.Drasil.UID

Methods

compare :: UID -> UID -> Ordering #

(<) :: UID -> UID -> Bool #

(<=) :: UID -> UID -> Bool #

(>) :: UID -> UID -> Bool #

(>=) :: UID -> UID -> Bool #

max :: UID -> UID -> UID #

min :: UID -> UID -> UID #

type Rep UID Source # 
Instance details

Defined in Language.Drasil.UID

type Rep UID = D1 ('MetaData "UID" "Language.Drasil.UID" "drasil-lang-0.1.60.0-DBn1BkDBuUQDwx8nbjDO1j" 'False) (C1 ('MetaCons "UID" 'PrefixI 'True) (S1 ('MetaSel ('Just "_namespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just "_baseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

class HasUID c where Source #

The most basic item: having a unique identifier key, here a UID.

Methods

uid :: Lens' c UID Source #

Provides a unique id for internal Drasil use.

Instances

Instances details
HasUID Citation Source #

Finds UID of the Citation.

Instance details

Defined in Language.Drasil.Chunk.Citation

Methods

uid :: Lens' Citation UID Source #

HasUID CodeChunk Source #

Finds the UID of the QuantityDict used to make the CodeChunk.

Instance details

Defined in Language.Drasil.Chunk.CodeVar

Methods

uid :: Lens' CodeChunk UID Source #

HasUID CodeFuncChunk Source #

Finds the UID of the CodeChunk used to make the CodeFuncChunk.

Instance details

Defined in Language.Drasil.Chunk.CodeVar

Methods

uid :: Lens' CodeFuncChunk UID Source #

HasUID CodeVarChunk Source #

Finds the UID of the CodeChunk used to make the CodeVarChunk.

Instance details

Defined in Language.Drasil.Chunk.CodeVar

Methods

uid :: Lens' CodeVarChunk UID Source #

HasUID CI Source #

Finds UID of the IdeaDict used to make the CI.

Instance details

Defined in Language.Drasil.Chunk.CommonIdea

Methods

uid :: Lens' CI UID Source #

HasUID ConceptChunk Source #

Finds UID of the IdeaDict used to make the ConceptChunk.

Instance details

Defined in Language.Drasil.Chunk.Concept.Core

Methods

uid :: Lens' ConceptChunk UID Source #

HasUID ConceptInstance Source #

Finds UID of the ConceptChunk used to make the ConceptInstance.

Instance details

Defined in Language.Drasil.Chunk.Concept.Core

Methods

uid :: Lens' ConceptInstance UID Source #

HasUID ConstrConcept Source #

Finds UID of the DefinedQuantityDict used to make the ConstrConcept.

Instance details

Defined in Language.Drasil.Chunk.Constrained

Methods

uid :: Lens' ConstrConcept UID Source #

HasUID ConstrainedChunk Source #

Finds UID of the QuantityDict used to make the ConstrainedChunk.

Instance details

Defined in Language.Drasil.Chunk.Constrained

Methods

uid :: Lens' ConstrainedChunk UID Source #

HasUID DefinedQuantityDict Source #

Finds the UID of the ConceptChunk used to make the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

HasUID DifferentialModel Source #

Finds the UID of the ConceptChunk used to make the DifferentialModel.

Instance details

Defined in Language.Drasil.Chunk.DifferentialModel

Methods

uid :: Lens' DifferentialModel UID Source #

HasUID IdeaDict Source #

Finds the UID of the IdeaDict used to make the IdeaDict.

Instance details

Defined in Language.Drasil.Chunk.NamedIdea

Methods

uid :: Lens' IdeaDict UID Source #

HasUID QuantityDict Source #

Finds the UID of the IdeaDict used to make the QuantityDict.

Instance details

Defined in Language.Drasil.Chunk.Quantity

Methods

uid :: Lens' QuantityDict UID Source #

HasUID RelationConcept Source #

Finds the UID of the ConceptChunk used to make the RelationConcept.

Instance details

Defined in Language.Drasil.Chunk.Relation

Methods

uid :: Lens' RelationConcept UID Source #

HasUID UncertQ Source #

Finds UID of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

uid :: Lens' UncertQ UID Source #

HasUID UncertainChunk Source #

Finds UID of the ConstrainedChunk used to make the UncertainChunk.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

uid :: Lens' UncertainChunk UID Source #

HasUID UnitDefn Source #

Finds UID of the ConceptChunk used to make the UnitDefn.

Instance details

Defined in Language.Drasil.Chunk.UnitDefn

Methods

uid :: Lens' UnitDefn UID Source #

HasUID UnitalChunk Source #

Finds UID of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

uid :: Lens' UnitalChunk UID Source #

HasUID UnitaryChunk Source #

Finds UID of the QuantityDict used to make the UnitaryChunk.

Instance details

Defined in Language.Drasil.Chunk.Unitary

Methods

uid :: Lens' UnitaryChunk UID Source #

HasUID DecRef Source #

Finds the UID of a Reference.

Instance details

Defined in Language.Drasil.DecoratedReference

Methods

uid :: Lens' DecRef UID Source #

HasUID Section Source #

Finds the UID of a Section.

Instance details

Defined in Language.Drasil.Document

Methods

uid :: Lens' Section UID Source #

HasUID LabelledContent Source #

Finds UID of the LabelledContent.

Instance details

Defined in Language.Drasil.Document.Core

Methods

uid :: Lens' LabelledContent UID Source #

HasUID Reference Source #

Finds the UID of a Reference.

Instance details

Defined in Language.Drasil.Reference

Methods

uid :: Lens' Reference UID Source #

HasUID (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

uid :: Lens' (QDefinition e) UID Source #

mkUid :: String -> UID Source #

Smart constructor for making a UID from a Value.

nsUid :: String -> UID -> UID Source #

Nest UID under a namespace

(+++) :: HasUID a => a -> String -> UID Source #

For when we need to modify a UID. We first take the base chunk's UID and then append a suffix to it.

(+++.) :: UID -> String -> UID Source #

For when we need to append something to a UID.

(+++!) :: (HasUID a, HasUID b) => a -> b -> UID Source #

showUID :: HasUID a => a -> String Source #

Grabs the UID from something that has a UID and displays it as a String.