Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Drasil.Chunk.Constrained
Contents
Description
Add constraints and a reasonable value to chunks that are quantities.
Synopsis
- data ConstrConcept = ConstrConcept {
- _defq :: DefinedQuantityDict
- _constr' :: [ConstraintE]
- _reasV' :: Maybe Expr
- cnstrw' :: (Quantity c, Concept c, Constrained c, HasReasVal c, MayHaveUnit c) => c -> ConstrConcept
- constrained' :: (Concept c, MayHaveUnit c, Quantity c) => c -> [ConstraintE] -> Expr -> ConstrConcept
- constrainedNRV' :: (Concept c, MayHaveUnit c, Quantity c) => c -> [ConstraintE] -> ConstrConcept
- cuc' :: IsUnit u => String -> NP -> String -> Symbol -> u -> Space -> [ConstraintE] -> Expr -> ConstrConcept
- cuc'' :: IsUnit u => String -> NP -> String -> (Stage -> Symbol) -> u -> Space -> [ConstraintE] -> Expr -> ConstrConcept
- cucNoUnit' :: String -> NP -> String -> Symbol -> Space -> [ConstraintE] -> Expr -> ConstrConcept
Constrained Chunks
From a Concept
data ConstrConcept Source #
ConstrConcepts are conceptual symbolic quantities (DefinedQuantityDict
)
with Constraint
s and maybe a reasonable value (no units!).
Similar to ConstrainedChunk
but includes a definition and domain.
Ex. Measuring the length of a pendulum arm could be a concept that has some reasonable value (between 1 cm and 2 m) and the constraint that the length cannot be a negative value.
Constructors
ConstrConcept | |
Fields
|
Instances
cnstrw' :: (Quantity c, Concept c, Constrained c, HasReasVal c, MayHaveUnit c) => c -> ConstrConcept Source #
Similar to cnstrw
, but types must also have a Concept
.
constrained' :: (Concept c, MayHaveUnit c, Quantity c) => c -> [ConstraintE] -> Expr -> ConstrConcept Source #
Creates a ConstrConcept
with a quantitative concept, a list of Constraint
s and an Expr
.
constrainedNRV' :: (Concept c, MayHaveUnit c, Quantity c) => c -> [ConstraintE] -> ConstrConcept Source #
Similar to constrained'
, but defaults Maybe
Expr
to Nothing
.
cuc' :: IsUnit u => String -> NP -> String -> Symbol -> u -> Space -> [ConstraintE] -> Expr -> ConstrConcept Source #
cuc'' :: IsUnit u => String -> NP -> String -> (Stage -> Symbol) -> u -> Space -> [ConstraintE] -> Expr -> ConstrConcept Source #
cucNoUnit' :: String -> NP -> String -> Symbol -> Space -> [ConstraintE] -> Expr -> ConstrConcept Source #
Similar to cuc', but does not include a unit.