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

Language.Drasil.Chunk.DefinedQuantity

Description

Contains types that define quantities from concepts.

Synopsis

Chunk Type

data DefinedQuantityDict Source #

DefinedQuantityDict is the combination of a Concept and a Quantity. Contains a ConceptChunk, a Symbol dependent on Stage, a Space, and maybe a UnitDefn. Used when we want to assign a quantity to a concept. Includes the space, symbol, and units for that quantity.

Ex. A pendulum arm can be defined as a concept with a symbol (l), space (Real numbers), and units (cm, m, etc.).

Instances

Instances details
HasChunkRefs DefinedQuantityDict Source # 
Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

HasUID DefinedQuantityDict Source #

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

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Methods

uid :: Getter DefinedQuantityDict UID #

Idea DefinedQuantityDict Source #

Finds the idea contained in the ConceptChunk used to make the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

NamedIdea DefinedQuantityDict Source #

Finds the term (Sentence) of the ConceptChunk used to make the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

MayHaveUnit DefinedQuantityDict Source #

Finds the units of the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

ConceptDomain DefinedQuantityDict Source #

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

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Definition DefinedQuantityDict Source #

Finds the definition contained in the ConceptChunk used to make the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Quantity DefinedQuantityDict Source #

DefinedQuantityDicts have a Quantity.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Express DefinedQuantityDict Source #

Convert the symbol of the DefinedQuantityDict to a ModelExpr.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

HasSpace DefinedQuantityDict Source #

Finds the Space of the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

HasSymbol DefinedQuantityDict Source #

Finds the Stage -> Symbol of the DefinedQuantityDict.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Eq DefinedQuantityDict Source #

Equal if UIDs are equal.

Instance details

Defined in Language.Drasil.Chunk.DefinedQuantity

Type classes

class DefinesQuantity d where Source #

Methods

defLhs :: Getter d DefinedQuantityDict Source #

Instances

Instances details
DefinesQuantity (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Constructors

quant Source #

Arguments

:: UID

The UID.

-> NP

The quantity being defined.

-> Sentence

The definition of the quantity.

-> Symbol

The Symbol used for the quantity.

-> Space

The Space of the quantity.

-> UnitDefn

The unit of the quantity.

-> DefinedQuantityDict 

Construct a DefinedQuantityDict (with a unit)

quant' Source #

Arguments

:: UID

The UID.

-> NP

The quantity being defined.

-> Sentence

The definition of the quantity.

-> (Stage -> Symbol)

The Symbol used for the quantity, dependent on the Stage.

-> Space

The Space of the quantity.

-> UnitDefn

The unit of the quantity.

-> DefinedQuantityDict 

Construct a DefinedQuantityDict (with a unit and a symbol dependent on stage)

quantAU Source #

Arguments

:: UID

The UID.

-> NP

The quantity being defined.

-> Sentence

The definition of the quantity.

-> Maybe String

The (optional) abbreviation for the quantity.

-> (Stage -> Symbol)

The Symbol used for the quantity, dependent on the Stage.

-> Space

The Space of the quantity.

-> Maybe UnitDefn

The (optional) unit of the quantity.

-> DefinedQuantityDict 

Construct a DefinedQuantityDict (with an optional unit, optional abbreviation and a symbol dependent on stage)

quantNoUnit Source #

Arguments

:: UID

The UID.

-> NP

The quantity being defined.

-> Sentence

The definition of the quantity.

-> Symbol

The Symbol used for the quantity.

-> Space

The Space of the quantity.

-> DefinedQuantityDict 

Construct a DefinedQuantityDict (without a unit)

quantNoUnit' Source #

Arguments

:: UID

The UID.

-> NP

The quantity being defined.

-> Sentence

The definition of the quantity.

-> (Stage -> Symbol)

The Symbol used for the quantity, dependent on the Stage.

-> Space

The Space of the quantity.

-> DefinedQuantityDict 

Construct a DefinedQuantityDict (wihout a unit and with a symbol dependent on stage)

dqd :: ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict Source #

Deprecated: Smart constructors allow externally-known chunk nesting; use one of `quant, quant', quantNoUnit, quantNoUnit'` instead.

Smart constructor that creates a DefinedQuantityDict with a ConceptChunk, a Symbol independent of Stage, a Space, and a unit.

dqdNoUnit :: ConceptChunk -> Symbol -> Space -> DefinedQuantityDict Source #

Deprecated: Smart constructors allow externally-known chunk nesting; use one of `quant, quant', quantNoUnit, quantNoUnit'` instead.

Similar to dqd, but without any units.

dqdNoUnit' :: ConceptChunk -> (Stage -> Symbol) -> Space -> DefinedQuantityDict Source #

Deprecated: Smart constructors allow externally-known chunk nesting; use one of `quant, quant', quantNoUnit, quantNoUnit'` instead.

dqd' :: ConceptChunk -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> DefinedQuantityDict Source #

Deprecated: Smart constructors allow externally-known chunk nesting; use one of `quant, quant', quantNoUnit, quantNoUnit'` instead.

Similar to dqd, but the Symbol is now dependent on the Stage.

dqdWr :: (Quantity c, Concept c, MayHaveUnit c) => c -> DefinedQuantityDict Source #

When the input already has all the necessary information. A projection operator from some a type with instances of listed classes to a DefinedQuantityDict.

implVar :: UID -> NP -> String -> Space -> Symbol -> DefinedQuantityDict Source #

Makes a variable that is implementation-only.

implVar' :: UID -> NP -> Sentence -> Space -> Symbol -> DefinedQuantityDict Source #

Similar to implVar, but takes in a Sentence for the description rather than a String.

implVarAU :: UID -> NP -> String -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> DefinedQuantityDict Source #

Similar to implVar but allows specification of abbreviation and unit.

implVarAU' :: UID -> NP -> Sentence -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> DefinedQuantityDict Source #

Similar to implVarAU but takes a Sentence for the description rather than a String.