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 vis smt md svr att prg => Label -> VS (r TypeData) -> Description -> [ParameterChunk] -> Maybe Description -> [MS (r Block)] -> GenState (MS (r md)) Source #

Generates a public function.

publicFuncProc :: SharedProg r vis smt md => Label -> VS (r TypeData) -> Description -> [ParameterChunk] -> Maybe Description -> [MS (r Block)] -> GenState (MS (r md)) Source #

Generates a public function.

privateMethod :: OOProg r vis smt md svr att prg => Label -> VS (r TypeData) -> Description -> [ParameterChunk] -> Maybe Description -> [MS (r Block)] -> GenState (MS (r md)) Source #

Generates a private method.

privateFuncProc :: SharedProg r vis smt md => Label -> VS (r TypeData) -> Description -> [ParameterChunk] -> Maybe Description -> [MS (r Block)] -> GenState (MS (r md)) Source #

Generates a private function.

publicInOutFunc :: OOProg r vis smt md svr att prg => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MS (r Block)] -> GenState (MS (r md)) Source #

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

publicInOutFuncProc :: SharedProg r vis smt md => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MS (r Block)] -> GenState (MS (r md)) Source #

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

privateInOutMethod :: OOProg r vis smt md svr att prg => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MS (r Block)] -> GenState (MS (r md)) Source #

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

privateInOutFuncProc :: SharedProg r vis smt md => Label -> Description -> [CodeVarChunk] -> [CodeVarChunk] -> [MS (r Block)] -> GenState (MS (r md)) Source #

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

genConstructor :: OOProg r vis smt md svr att prg => Label -> Description -> [ParameterChunk] -> [MS (r Block)] -> GenState (MS (r md)) Source #

Generates a constructor.

mkVar :: (SelfSym r, VariableElim r, VariableValue r) => CodeVarChunk -> GenState (SVariable r) Source #

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

mkVarProc :: VariableSym r => CodeVarChunk -> GenState (SVariable r) Source #

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

mkVal :: (OOStatement r smt, TypeElim r, VariableElim r) => CodeVarChunk -> GenState (SValue r) Source #

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

mkValProc :: (NativeVector r, SharedStatement r smt, TypeElim r) => CodeVarChunk -> GenState (SValue r) Source #

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

convExpr :: (OOStatement r smt, TypeElim r, VariableElim r) => CodeExpr -> GenState (SValue r) Source #

Converts an Expr to a GOOL Value.

convExprProc :: (NativeVector r, SharedStatement r smt, TypeElim r) => CodeExpr -> GenState (SValue r) Source #

Converts an Expr to a GOOL Value.

convStmt :: (OOStatement r smt, TypeElim r, VariableElim r) => FuncStmt -> GenState (MS (r smt)) Source #

Converts a FuncStmt to a GOOL Statement.

convStmtProc :: (NativeVector r, SharedStatement r smt, TypeElim r, VariableElim r) => FuncStmt -> GenState (MS (r smt)) Source #

Converts a FuncStmt to a GOOL Statement.

genModDef :: OOProg r vis smt md svr att prg => Mod -> GenState (FS (r File)) Source #

Converts a Mod to GOOL.

genModDefProc :: (ProcProg r vis smt md prg, NativeVector r) => Mod -> GenState (FS (r File)) Source #

Converts a Mod to GOOL.

genModFuncs :: OOProg r vis smt md svr att prg => Mod -> [GenState (MS (r md))] Source #

Converts a Mod's functions to GOOL.

genModFuncsProc :: (SharedProg r vis smt md, NativeVector r) => Mod -> [GenState (MS (r md))] Source #

Converts a Mod's functions to GOOL.

genModClasses :: OOProg r vis smt md svr att prg => Mod -> [GenState (CS (r Class))] Source #

Converts a Mod's classes to GOOL.

readData :: (OOStatement r smt, TypeElim r, VariableElim r) => DataDesc -> GenState [MS (r Block)] Source #

Read from a data description into an 'MS Block' of 'MS Statement's.

readDataProc :: (NativeVector r, SharedStatement r smt, TypeElim r) => DataDesc -> GenState [MS (r Block)] Source #

Read from a data description into an 'MS Block' of 'MS Statement's.