Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Add constraints and a reasonable value to chunks that are quantities.
Synopsis
- data ConstrainedChunk = ConstrainedChunk {
- _qd :: QuantityDict
- _constr :: [ConstraintE]
- _reasV :: Maybe Expr
- cuc :: IsUnit u => String -> NP -> Symbol -> u -> Space -> [ConstraintE] -> Expr -> ConstrainedChunk
- cvc :: String -> NP -> Symbol -> Space -> [ConstraintE] -> Maybe Expr -> ConstrainedChunk
- cnstrw :: (Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => c -> ConstrainedChunk
- 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
Constrained Chunks
From an Idea
data ConstrainedChunk Source #
ConstrainedChunks are symbolic quantities (QuantityDict
)
with Constraint
s and maybe a typical value (Maybe
Expr
).
Ex. Measuring the length of a pendulum would have some reasonable value (between 1 cm and 2 m) and the constraint that the length cannot be a negative value.
ConstrainedChunk | |
|
Instances
cuc :: IsUnit u => String -> NP -> Symbol -> u -> Space -> [ConstraintE] -> Expr -> ConstrainedChunk Source #
cnstrw :: (Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => c -> ConstrainedChunk Source #
Creates a new ConstrainedChunk from either a ConstrainedChunk
, ConstrConcept
, UncertainChunk
, or an UncertQ
.
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.
ConstrConcept | |
|
Instances
cnstrw' :: (Quantity c, Concept c, Constrained c, HasReasVal c, MayHaveUnit c) => c -> ConstrConcept Source #
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
.