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

Description

Defines chunks to add units to a quantity. Similar to UnitaryChunk.

Synopsis

Chunk Type

data UnitalChunk Source #

Similar to a DefinedQuantityDict, UnitalChunks are concepts with quantities that must have a unit definition. Contains DefinedQuantityDicts and a UnitDefn.

Ex. A pendulum arm is a tangible object with a symbol (l) and units (cm, m, etc.).

Constructors

UC 

Instances

Instances details
Idea UnitalChunk Source #

Finds the idea contained in the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

NamedIdea UnitalChunk Source #

Finds term (NP) of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

term :: Lens' UnitalChunk NP Source #

MayHaveUnit UnitalChunk Source #

Finds the units used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

TempHasUnit UnitalChunk Source #

Finds the units used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Unitary UnitalChunk Source #

Finds the unit definition of a UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

ConceptDomain UnitalChunk Source #

Finds the domain contained in the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

cdom :: UnitalChunk -> [UID] Source #

Definition UnitalChunk Source #

Finds definition of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

defn :: Lens' UnitalChunk Sentence Source #

Quantity UnitalChunk Source #

UnitalChunks have a Quantity.

Instance details

Defined in Language.Drasil.Chunk.Unital

Express UnitalChunk Source #

Convert the symbol of the UnitalChunk to a ModelExpr.

Instance details

Defined in Language.Drasil.Chunk.Unital

HasSpace UnitalChunk Source #

Finds the Space of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

typ :: Getter UnitalChunk Space Source #

HasSymbol UnitalChunk Source #

Finds the Symbol of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

HasUID UnitalChunk Source #

Finds UID of the DefinedQuantityDict used to make the UnitalChunk.

Instance details

Defined in Language.Drasil.Chunk.Unital

Methods

uid :: Getter UnitalChunk UID Source #

Eq UnitalChunk Source #

Equal if UIDs are equal.

Instance details

Defined in Language.Drasil.Chunk.Unital

Constructors

uc :: (Concept c, IsUnit u) => c -> Symbol -> Space -> u -> UnitalChunk Source #

Used to create a UnitalChunk from a Concept, Symbol, and Unit.

uc' :: IsUnit u => String -> NP -> Sentence -> Symbol -> Space -> u -> UnitalChunk Source #

Similar to uc, except it builds the Concept portion of the UnitalChunk from a given UID, term, and definition (as a Sentence) which are its first three arguments.

ucStaged :: (Concept c, IsUnit u) => c -> (Stage -> Symbol) -> Space -> u -> UnitalChunk Source #

Similar to uc, but Symbol is dependent on the Stage.

ucStaged' :: IsUnit u => String -> NP -> Sentence -> (Stage -> Symbol) -> Space -> u -> UnitalChunk Source #

Similar to uc', but Symbol is dependent on the Stage.

ucuc :: (Quantity c, Concept c, MayHaveUnit c) => c -> UnitDefn -> UnitalChunk Source #

Attach units to a chunk that has a symbol and definition.

ucw :: (Unitary c, Concept c, MayHaveUnit c) => c -> UnitalChunk Source #

Constructs a UnitalChunk from a Concept with Units.