| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.CodeSpec
Description
Defines the CodeSpec structure and related functions.
Synopsis
- type Input = CodeVarChunk
- type Output = CodeVarChunk
- type Const = CodeDefinition
- type Derived = CodeDefinition
- type ConstantMap = Map UID CodeDefinition
- data CodeSpec
- class HasCodeSpec c where
- codeSpec :: Lens' c CodeSpec
- cMap :: Lens' c ConstraintCEMap
- configFiles :: Lens' c [RelativeFile]
- constDefns :: Lens' c [Const]
- constMap :: Lens' c ConstantMap
- derivedInputs :: Lens' c [Derived]
- execOrder :: Lens' c [Def]
- extInputs :: Lens' c [Input]
- inputs :: Lens' c [Input]
- mods :: Lens' c [Mod]
- outputs :: Lens' c [Output]
- srs :: Lens' c SmithEtAlSRS
- mkCodeSpec :: SmithEtAlSRS -> Choices -> CodeSpec
- getODE :: [ExtLib] -> Maybe ODE
- mapODE :: Maybe ODE -> [CodeDefinition]
- asVC :: Func -> DefinedQuantityDict
- funcUID :: Func -> UID
- getDerivedInputs :: [DataDefinition] -> [Input] -> [Const] -> ChunkDB -> [SimpleQDef]
- getConstraints :: HasUID c => ConstraintCEMap -> [c] -> [ConstraintCE]
- constraintvars :: ConstraintCE -> ChunkDB -> [CodeVarChunk]
Types
type Input = CodeVarChunk Source #
Program input.
type Output = CodeVarChunk Source #
Program output.
type Const = CodeDefinition Source #
Constants in the problem.
type Derived = CodeDefinition Source #
Derived inputs.
type ConstantMap = Map UID CodeDefinition Source #
Maps constants to their respective CodeDefinition.
Code Specification. Holds system information and options.
Instances
Typeclasses
class HasCodeSpec c where Source #
Minimal complete definition
Methods
codeSpec :: Lens' c CodeSpec Source #
cMap :: Lens' c ConstraintCEMap Source #
configFiles :: Lens' c [RelativeFile] Source #
constDefns :: Lens' c [Const] Source #
constMap :: Lens' c ConstantMap Source #
derivedInputs :: Lens' c [Derived] Source #
execOrder :: Lens' c [Def] Source #
extInputs :: Lens' c [Input] Source #
inputs :: Lens' c [Input] Source #
mods :: Lens' c [Mod] Source #
outputs :: Lens' c [Output] Source #
srs :: Lens' c SmithEtAlSRS Source #
Instances
Constructors
mkCodeSpec :: SmithEtAlSRS -> Choices -> CodeSpec Source #
ODEs
mapODE :: Maybe ODE -> [CodeDefinition] Source #
Maps ODE to their respective CodeDefinition.
Hacks
asVC :: Func -> DefinedQuantityDict Source #
Convert a Func to an implementation-stage DefinedQuantityDict representing the
function.
getDerivedInputs :: [DataDefinition] -> [Input] -> [Const] -> ChunkDB -> [SimpleQDef] Source #
Determines the derived inputs, which can be immediately calculated from the
knowns (inputs and constants). If there are DDs, the derived inputs will
come from those. If there are none, then the QDefinitions are used instead.
getConstraints :: HasUID c => ConstraintCEMap -> [c] -> [ConstraintCE] Source #
Get a list of Constraints for a list of CodeChunks.
constraintvars :: ConstraintCE -> ChunkDB -> [CodeVarChunk] Source #
Get a list of CodeVarChunks from a constraint.