drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Chunk.UncertainQuantity

Description

For adding an uncertainty value to quantities with constraints.

Synopsis

Chunk Types

data UncertQ Source #

UncertQs are conceptual symbolic quantities with constraints and an Uncertainty. Contains a ConstrConcept and an Uncertainty.

Ex. Measuring the length of a pendulum arm may be recorded with an uncertainty value.

Instances

Instances details
Generic UncertQ Source # 
Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Associated Types

type Rep UncertQ :: Type -> Type #

Methods

from :: UncertQ -> Rep UncertQ x #

to :: Rep UncertQ x -> UncertQ #

HasChunkRefs UncertQ Source # 
Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

chunkRefs :: UncertQ -> Set UID #

HasUID UncertQ Source #

Finds UID of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

uid :: Getter UncertQ UID #

Idea UncertQ Source #

Finds the idea contained in the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

NamedIdea UncertQ Source #

Finds term (NP) of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

term :: Lens' UncertQ NP Source #

MayHaveUnit UncertQ Source #

Finds the units of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

ConceptDomain UncertQ Source #

Finds the domain contained in the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

cdom :: UncertQ -> [UID] Source #

Constrained UncertQ Source #

Finds the Constraints of a ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Definition UncertQ Source #

Finds definition of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

defn :: Lens' UncertQ Sentence Source #

HasReasVal UncertQ Source #

Finds a reasonable value for the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

reasVal :: Lens' UncertQ (Maybe Expr) Source #

MayHaveRationale UncertQ Source #

Finds the rationale for the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Express UncertQ Source #

Convert the symbol of the UncertQ to a ModelExpr.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

HasSpace UncertQ Source #

Finds the Space of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

typ :: Getter UncertQ Space Source #

HasSymbol UncertQ Source #

Finds the Symbol of the ConstrConcept used to make the UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

symbol :: UncertQ -> Stage -> Symbol Source #

HasUncertainty UncertQ Source #

Finds the uncertainty of an UncertQ.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

unc :: Lens' UncertQ Uncertainty Source #

Eq UncertQ Source #

Equal if UIDs are equal.

Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

Methods

(==) :: UncertQ -> UncertQ -> Bool #

(/=) :: UncertQ -> UncertQ -> Bool #

type Rep UncertQ Source # 
Instance details

Defined in Language.Drasil.Chunk.UncertainQuantity

type Rep UncertQ = D1 ('MetaData "UncertQ" "Language.Drasil.Chunk.UncertainQuantity" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) (C1 ('MetaCons "UQ" 'PrefixI 'True) (S1 ('MetaSel ('Just "_coco") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ConstrConcept) :*: S1 ('MetaSel ('Just "_unc''") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uncertainty)))

Constructors

uq :: (Quantity c, Constrained c, Concept c, HasReasVal c, MayHaveUnit c) => c -> Uncertainty -> UncertQ Source #

Smart constructor that requires a Quantity, a percentage, and a typical value with an Uncertainty.

uqc :: String -> NP -> String -> Symbol -> UnitDefn -> Space -> [ConstraintE] -> Expr -> Uncertainty -> UncertQ Source #

Uncertainty quantity (uq) but with a constraint.

uqcND :: String -> NP -> Symbol -> UnitDefn -> Space -> [ConstraintE] -> Expr -> Uncertainty -> UncertQ Source #

Uncertainty quantity constraint (uqc) without a description.

Direct constructor (preserves ConstrConcept fields)

uqDirect :: ConstrConcept -> Uncertainty -> UncertQ Source #

Directly wraps a ConstrConcept with an Uncertainty, preserving all fields (including rationale).