| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Chunk.DefinedQuantity
Description
Contains types that define quantities from concepts.
Synopsis
- data DefinedQuantityDict
- class DefinesQuantity d where
- defLhs :: Getter d DefinedQuantityDict
- quant :: UID -> NP -> Sentence -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
- quant' :: UID -> NP -> Sentence -> (Stage -> Symbol) -> Space -> UnitDefn -> DefinedQuantityDict
- quantAU :: UID -> NP -> Sentence -> Maybe String -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> DefinedQuantityDict
- quantNoUnit :: UID -> NP -> Sentence -> Symbol -> Space -> DefinedQuantityDict
- quantNoUnit' :: UID -> NP -> Sentence -> (Stage -> Symbol) -> Space -> DefinedQuantityDict
- dqd :: ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
- dqdNoUnit :: ConceptChunk -> Symbol -> Space -> DefinedQuantityDict
- dqdNoUnit' :: ConceptChunk -> (Stage -> Symbol) -> Space -> DefinedQuantityDict
- dqd' :: ConceptChunk -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> DefinedQuantityDict
- dqdWr :: (Quantity c, Concept c, MayHaveUnit c) => c -> DefinedQuantityDict
- implVar :: UID -> NP -> String -> Space -> Symbol -> DefinedQuantityDict
- implVar' :: UID -> NP -> Sentence -> Space -> Symbol -> DefinedQuantityDict
- implVarAU :: UID -> NP -> String -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> DefinedQuantityDict
- implVarAU' :: UID -> NP -> Sentence -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> DefinedQuantityDict
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
Type classes
class DefinesQuantity d where Source #
Methods
defLhs :: Getter d DefinedQuantityDict Source #
Instances
| DefinesQuantity (QDefinition e) Source # | |
Defined in Language.Drasil.Chunk.Eq Methods defLhs :: Getter (QDefinition e) DefinedQuantityDict Source # | |
Constructors
Arguments
| :: UID | The |
| -> NP | The quantity being defined. |
| -> Sentence | The definition of the quantity. |
| -> Symbol | The |
| -> Space | The |
| -> UnitDefn | The unit of the quantity. |
| -> DefinedQuantityDict |
Construct a DefinedQuantityDict (with a unit)
Arguments
| :: UID | The |
| -> NP | The quantity being defined. |
| -> Sentence | The definition of the quantity. |
| -> (Stage -> Symbol) | |
| -> Space | The |
| -> UnitDefn | The unit of the quantity. |
| -> DefinedQuantityDict |
Construct a DefinedQuantityDict (with a unit and a symbol dependent on stage)
Arguments
| :: UID | The |
| -> NP | The quantity being defined. |
| -> Sentence | The definition of the quantity. |
| -> Maybe String | The (optional) abbreviation for the quantity. |
| -> (Stage -> Symbol) | |
| -> Space | The |
| -> Maybe UnitDefn | The (optional) unit of the quantity. |
| -> DefinedQuantityDict |
Construct a DefinedQuantityDict (with an optional unit, optional
abbreviation and a symbol dependent on stage)
Arguments
| :: UID | The |
| -> NP | The quantity being defined. |
| -> Sentence | The definition of the quantity. |
| -> Symbol | The |
| -> Space | The |
| -> DefinedQuantityDict |
Construct a DefinedQuantityDict (without a unit)
Arguments
| :: UID | The |
| -> NP | The quantity being defined. |
| -> Sentence | The definition of the quantity. |
| -> (Stage -> Symbol) | |
| -> Space | The |
| -> 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 #
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.