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.Eq

Description

Contains chunks related to adding an expression to a quantitative concept.

Synopsis

Types

data QDefinition e Source #

Instances

Instances details
DefiningExpr QDefinition Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

defnExpr :: Lens' (QDefinition e) e Source #

Idea (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

NamedIdea (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

term :: Lens' (QDefinition e) NP Source #

DefinesQuantity (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

defLhs :: Getter (QDefinition e) QuantityDict Source #

MayHaveUnit (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

ConceptDomain (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

cdom :: QDefinition e -> [UID] Source #

Definition (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

defn :: Lens' (QDefinition e) Sentence Source #

Quantity (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Express e => Express (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

HasSpace (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

typ :: Getter (QDefinition e) Space Source #

HasSymbol (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

HasUID (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Methods

uid :: Getter (QDefinition e) UID Source #

Eq (QDefinition e) Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

RequiresChecking (QDefinition Expr) Expr Space Source # 
Instance details

Defined in Language.Drasil.Chunk.Eq

Constructors

fromEqn :: IsUnit u => String -> NP -> Sentence -> Symbol -> Space -> u -> e -> QDefinition e Source #

Create a QDefinition with a UID (as a Space), term (NP), definition (Sentence), Symbol, Space, unit, and defining expression.

fromEqn' :: String -> NP -> Sentence -> Symbol -> Space -> e -> QDefinition e Source #

Same as fromEqn, but has no units.

fromEqnSt :: IsUnit u => UID -> NP -> Sentence -> (Stage -> Symbol) -> Space -> u -> e -> QDefinition e Source #

Same as fromEqn, but symbol depends on stage.

fromEqnSt' :: UID -> NP -> Sentence -> (Stage -> Symbol) -> Space -> e -> QDefinition e Source #

Same as fromEqn, but symbol depends on stage and has no units.

fromEqnSt'' :: String -> NP -> Sentence -> (Stage -> Symbol) -> Space -> e -> QDefinition e Source #

Same as fromEqnSt', but takes a Space instead of a UID.

mkQDefSt :: UID -> NP -> Sentence -> (Stage -> Symbol) -> Space -> Maybe UnitDefn -> e -> QDefinition e Source #

Wrapper for fromEqnSt and fromEqnSt'

mkQuantDef :: (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e Source #

Used to help make QDefinitions when UID, term, and Symbol come from the same source.

mkQuantDef' :: (Quantity c, MayHaveUnit c) => c -> NP -> e -> QDefinition e Source #

Used to help make QDefinitions when UID and Symbol come from the same source, with the term separate.

ec :: (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e Source #

Smart constructor for QDefinitions. Requires a quantity and its defining equation.

mkFuncDef :: (HasUID f, HasSymbol f, HasSpace f, HasUID i, HasSymbol i, HasSpace i, IsUnit u) => f -> NP -> Sentence -> u -> [i] -> e -> QDefinition e Source #

Create a QDefinition function with a symbol, name, term, list of inputs, resultant units, and a defining Expr

mkFuncDef' :: (HasUID f, HasSymbol f, HasSpace f, HasUID i, HasSymbol i, HasSpace i) => f -> NP -> Sentence -> [i] -> e -> QDefinition e Source #

Create a QDefinition function with a symbol, name, term, list of inputs, and a defining Expr

mkFuncDefByQ :: (Quantity c, MayHaveUnit c, HasSpace c, Quantity i, HasSpace i) => c -> [i] -> e -> QDefinition e Source #

Create a QDefinition functions using a symbol, list of inputs, and a defining Expr