drasil-code-0.1.9.0: A framework for code and document generation for scientific software - Code SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Code.Imperative.Import

Synopsis

Documentation

codeType :: HasSpace c => c -> GenState CodeType Source #

Gets a chunk's CodeType, by checking which CodeType the user has chosen to match the chunk's Space to.

spaceCodeType :: Space -> GenState CodeType Source #

Gets the CodeType for a Space, based on the user's choice.

publicFunc :: OOProg r => Label -> VSType r -> Description -> [ParameterChunk] -> Maybe Description -> [MSBlock r] -> GenState (SMethod r) Source #

Generates a public function.

privateMethod :: OOProg r => Label -> VSType r -> Description -> [ParameterChunk] -> Maybe Description -> [MSBlock r] -> GenState (SMethod r) Source #

Generates a private method.

publicInOutFunc :: OOProg r => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MSBlock r] -> GenState (SMethod r) Source #

Generates a public function, defined by its inputs and outputs.

privateInOutMethod :: OOProg r => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MSBlock r] -> GenState (SMethod r) Source #

Generates a private method, defined by its inputs and outputs.

genConstructor :: OOProg r => Label -> Description -> [ParameterChunk] -> [MSBlock r] -> GenState (SMethod r) Source #

Generates a constructor.

mkVar :: OOProg r => CodeVarChunk -> GenState (SVariable r) Source #

Generates a GOOL Variable for a variable represented by a CodeVarChunk.

mkVal :: OOProg r => CodeVarChunk -> GenState (SValue r) Source #

Generates a GOOL Value for a variable represented by a CodeVarChunk.

convExpr :: OOProg r => CodeExpr -> GenState (SValue r) Source #

Converts an Expr to a GOOL Value.

convStmt :: OOProg r => FuncStmt -> GenState (MSStatement r) Source #

Converts a FuncStmt to a GOOL Statement.

genModDef :: OOProg r => Mod -> GenState (SFile r) Source #

Converts a Mod to GOOL.

genModFuncs :: OOProg r => Mod -> [GenState (SMethod r)] Source #

Converts a Mod's functions to GOOL.

genModClasses :: OOProg r => Mod -> [GenState (SClass r)] Source #

Converts a Mod's classes to GOOL.

readData :: OOProg r => DataDesc -> GenState [MSBlock r] Source #

Read from a data description into a MSBlock of MSStatements.