| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Code.Imperative.GenerateGOOL
Synopsis
- data ClassType
- genModuleWithImports :: OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r cls)))] -> GenState (FS (r file))
- genModuleWithImportsProc :: ProcProg r prg file mod mthd vis param bod block stmt var scope val binder typ => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> GenState (FS (r file))
- genModule :: OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r cls)))] -> GenState (FS (r file))
- genModuleProc :: ProcProg r prg file mod mthd vis param bod block stmt var scope val binder typ => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> GenState (FS (r file))
- genDoxConfig :: SoftwareDossierSym r => SoftwareDossierState -> GenState (Maybe (r FileLayout))
- genReadMe :: SoftwareDossierSym r => ReadMeInfo -> GenState (Maybe (r FileLayout))
- primaryClass :: forall {k} r (cls :: k) (stvr :: k) (mthd :: k). ClassSym r cls stvr mthd => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r cls))
- auxClass :: forall {k} r (cls :: k) (stvr :: k) (mthd :: k). ClassSym r cls stvr mthd => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r cls))
- fApp :: forall {k} r (val :: k) (typ :: k) (var :: k) (binder :: k). (ValueSym r val typ, Argument r val, VariableValue r var val, SelfSym r var, InternalValueExp r var val typ, ValueExpression r var val binder typ, TypeElim r typ) => Name -> Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val))
- fAppProc :: forall {k} r (val :: k) (typ :: k) (var :: k) (binder :: k). (ValueSym r val typ, Argument r val, TypeElim r typ, ValueExpression r var val binder typ) => Name -> Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val))
- ctorCall :: forall {k} r (val :: k) (typ :: k) (var :: k). (ValueSym r val typ, Argument r val, OOValueExpression r var val typ, TypeElim r typ) => Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val))
- fAppInOut :: forall {k} r (stmt :: k) (var :: k) (val :: k). (FuncAppStatement r stmt var val, OOFuncAppStatement r stmt var val) => Name -> Name -> [VS (r val)] -> [VS (r var)] -> [VS (r var)] -> GenState (MS (r stmt))
- fAppInOutProc :: forall {k} r (stmt :: k) (var :: k) (val :: k). FuncAppStatement r stmt var val => Name -> Name -> [VS (r val)] -> [VS (r var)] -> [VS (r var)] -> GenState (MS (r stmt))
Documentation
genModuleWithImports :: OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r cls)))] -> GenState (FS (r file)) Source #
Defines a GOOL module. If the user chose CommentMod, the module will have
Doxygen comments. If the user did not choose CommentMod but did choose
CommentFunc, a module-level Doxygen comment is still created, though it only
documents the file name, because without this Doxygen will not find the
function-level comments in the file.
genModuleWithImportsProc :: ProcProg r prg file mod mthd vis param bod block stmt var scope val binder typ => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> GenState (FS (r file)) Source #
Defines a GOOL module. If the user chose CommentMod, the module will have
Doxygen comments. If the user did not choose CommentMod but did choose
CommentFunc, a module-level Doxygen comment is still created, though it only
documents the file name, because without this Doxygen will not find the
function-level comments in the file.
genModule :: OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r cls)))] -> GenState (FS (r file)) Source #
Generates a module for when imports do not need to be explicitly stated.
genModuleProc :: ProcProg r prg file mod mthd vis param bod block stmt var scope val binder typ => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> GenState (FS (r file)) Source #
Generates a module for when imports do not need to be explicitly stated.
genDoxConfig :: SoftwareDossierSym r => SoftwareDossierState -> GenState (Maybe (r FileLayout)) Source #
Generates a Doxygen configuration file if the user has comments enabled.
genReadMe :: SoftwareDossierSym r => ReadMeInfo -> GenState (Maybe (r FileLayout)) Source #
Generates a README file.
primaryClass :: forall {k} r (cls :: k) (stvr :: k) (mthd :: k). ClassSym r cls stvr mthd => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r cls)) Source #
Generates a primary class.
auxClass :: forall {k} r (cls :: k) (stvr :: k) (mthd :: k). ClassSym r cls stvr mthd => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r cls)) Source #
Generates an auxiliary class (for when a module contains multiple classes).
fApp :: forall {k} r (val :: k) (typ :: k) (var :: k) (binder :: k). (ValueSym r val typ, Argument r val, VariableValue r var val, SelfSym r var, InternalValueExp r var val typ, ValueExpression r var val binder typ, TypeElim r typ) => Name -> Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val)) Source #
Function call generator.
The first parameter (m) is the module where the function is defined.
If m is not the current module, use GOOL's function for calling functions from
external modules.
If m is the current module and the function is in export map, use GOOL's basic
function for function applications.
If m is the current module and function is not exported, use GOOL's function for
calling a method on self. This assumes all private methods are dynamic,
which is true for this generator.
fAppProc :: forall {k} r (val :: k) (typ :: k) (var :: k) (binder :: k). (ValueSym r val typ, Argument r val, TypeElim r typ, ValueExpression r var val binder typ) => Name -> Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val)) Source #
Function call generator.
The first parameter (m) is the module where the function is defined.
If m is not the current module, use GOOL's function for calling functions from
external modules.
If m is the current module and the function is in export map, use GOOL's basic
function for function applications.
If m is the current module and function is not exported, use GOOL's function for
calling a method on self. This assumes all private methods are dynamic,
which is true for this generator.
ctorCall :: forall {k} r (val :: k) (typ :: k) (var :: k). (ValueSym r val typ, Argument r val, OOValueExpression r var val typ, TypeElim r typ) => Name -> VS (r typ) -> [VS (r val)] -> NamedArgs r var val -> GenState (VS (r val)) Source #
Logic similar to fApp, but the self case is not required here
(because constructor will never be private). Calls newObjMixedArgs.