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-1og6tFXnKFbLTuAQwKCKBH" '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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter 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 :: Getter UnitaryChunk UID Source #

HasUID DecRef Source #

Finds the UID of a Reference.

Instance details

Defined in Language.Drasil.DecoratedReference

Methods

uid :: Getter DecRef UID Source #

HasUID Section Source #

Finds the UID of a Section.

Instance details

Defined in Language.Drasil.Document

Methods

uid :: Getter Section UID Source #

HasUID LabelledContent Source #

Finds UID of the LabelledContent.

Instance details

Defined in Language.Drasil.Document.Core

Methods

uid :: Getter LabelledContent UID Source #

HasUID Reference Source #

Finds the UID of a Reference.

Instance details

Defined in Language.Drasil.Reference

Methods

uid :: Getter Reference UID Source #

HasUID (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

uid :: Getter (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.