Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines chunks that add quantities to an idea. Similar to DefinedQuantityDict
.
Synopsis
- data QuantityDict
- class DefinesQuantity d where
- defLhs :: Getter d QuantityDict
- codeVC :: Idea c => c -> Symbol -> Space -> QuantityDict
- implVar :: String -> NP -> Space -> Symbol -> QuantityDict
- implVar' :: String -> NP -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> QuantityDict
- implVarUID :: UID -> NP -> Space -> Symbol -> QuantityDict
- implVarUID' :: UID -> NP -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> QuantityDict
- mkQuant :: String -> NP -> Symbol -> Space -> Maybe UnitDefn -> Maybe String -> QuantityDict
- mkQuant' :: String -> NP -> Maybe String -> Space -> (Stage -> Symbol) -> Maybe UnitDefn -> QuantityDict
- qw :: (Quantity q, MayHaveUnit q) => q -> QuantityDict
- vc :: String -> NP -> Symbol -> Space -> QuantityDict
- vc'' :: Idea c => c -> Symbol -> Space -> QuantityDict
- vcSt :: String -> NP -> (Stage -> Symbol) -> Space -> QuantityDict
- vcUnit :: String -> NP -> Symbol -> Space -> UnitDefn -> QuantityDict
Chunk Type
data QuantityDict Source #
QuantityDict is a combination of an IdeaDict
with a quantity.
Contains an IdeaDict
, Space
, a function from
Stage
-> Symbol
, and Maybe
a UnitDefn
.
Ex. A pendulum arm does not necessarily have to be defined as a concept before we assign a space (Real numbers), a symbol (l), or units (cm, m, etc.).
Instances
Class
class DefinesQuantity d where Source #
defLhs :: Getter d QuantityDict Source #
Instances
DefinesQuantity (QDefinition e) Source # | |
Defined in Language.Drasil.Chunk.Eq defLhs :: Getter (QDefinition e) QuantityDict Source # |
Constructors
codeVC :: Idea c => c -> Symbol -> Space -> QuantityDict Source #
Makes a QuantityDict
from an Idea
, Symbol
, and Space
.
Symbol
is implementation-only.
implVar :: String -> NP -> Space -> Symbol -> QuantityDict Source #
Makes a variable that is implementation-only.
implVar' :: String -> NP -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> QuantityDict Source #
Similar to implVar
but allows specification of abbreviation and unit.
implVarUID :: UID -> NP -> Space -> Symbol -> QuantityDict Source #
implVarUID' :: UID -> NP -> Maybe String -> Space -> Symbol -> Maybe UnitDefn -> QuantityDict Source #
mkQuant :: String -> NP -> Symbol -> Space -> Maybe UnitDefn -> Maybe String -> QuantityDict Source #
mkQuant' :: String -> NP -> Maybe String -> Space -> (Stage -> Symbol) -> Maybe UnitDefn -> QuantityDict Source #
qw :: (Quantity q, MayHaveUnit q) => q -> QuantityDict Source #
Smart constructor for a QuantityDict
from another Quantity
with units.
vc :: String -> NP -> Symbol -> Space -> QuantityDict Source #
Creates a QuantityDict
from a UID
, term (NP
), Symbol
, and Space
.
vc'' :: Idea c => c -> Symbol -> Space -> QuantityDict Source #
Creates a QuantityDict
from an Idea
, Symbol
, and Space
.