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
- dqd :: IsUnit u => ConceptChunk -> Symbol -> Space -> u -> DefinedQuantityDict
- dqdNoUnit :: ConceptChunk -> Symbol -> Space -> DefinedQuantityDict
- dqdNoUnit' :: ConceptChunk -> (Stage -> Symbol) -> Space -> DefinedQuantityDict
- dqd' :: ConceptChunk -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> DefinedQuantityDict
- dqdQd :: (Quantity c, MayHaveUnit c) => c -> Sentence -> DefinedQuantityDict
- dqdWr :: (Quantity c, Concept c, MayHaveUnit c) => c -> DefinedQuantityDict
- implVar :: String -> NP -> String -> Space -> Symbol -> DefinedQuantityDict
- implVar' :: String -> NP -> Sentence -> Space -> Symbol -> DefinedQuantityDict
- implVarAU :: String -> NP -> String -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> DefinedQuantityDict
- implVarAU' :: String -> 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
dqd :: IsUnit u => ConceptChunk -> Symbol -> Space -> u -> DefinedQuantityDict Source #
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 #
Similar to dqd
, but without any units.
dqdNoUnit' :: ConceptChunk -> (Stage -> Symbol) -> Space -> DefinedQuantityDict Source #
dqd' :: ConceptChunk -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> DefinedQuantityDict Source #
dqdQd :: (Quantity c, MayHaveUnit c) => c -> Sentence -> DefinedQuantityDict Source #
When we want to merge a quantity and a concept. This is suspicious.
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 :: String -> NP -> String -> Space -> Symbol -> DefinedQuantityDict Source #
Makes a variable that is implementation-only.