| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Code.Imperative.GenerateGOOL
Synopsis
- data ClassType
- genModuleWithImports :: OOProg r vis stmt mthd stvr attch prg file mod bod block => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r Class)))] -> GenState (FS (r file))
- genModuleWithImportsProc :: ProcProg r vis stmt mthd prg file mod bod block => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> GenState (FS (r file))
- genModule :: OOProg r vis stmt mthd stvr attch prg file mod bod block => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r Class)))] -> GenState (FS (r file))
- genModuleProc :: ProcProg r vis stmt mthd prg file mod bod block => 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 :: ClassSym r vis mthd stvr attch => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r Class))
- auxClass :: ClassSym r vis mthd stvr attch => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r Class))
- fApp :: (Argument r, VariableValue r, SelfSym r, InternalValueExp r, ValueExpression r, TypeElim r) => Name -> Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r)
- fAppProc :: (Argument r, TypeElim r, ValueExpression r) => Name -> Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r)
- ctorCall :: (Argument r, OOValueExpression r, TypeElim r) => Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r)
- fAppInOut :: OOFuncAppStatement r stmt => Name -> Name -> [SValue r] -> [SVariable r] -> [SVariable r] -> GenState (MS (r stmt))
- fAppInOutProc :: FuncAppStatement r stmt => Name -> Name -> [SValue r] -> [SVariable r] -> [SVariable r] -> GenState (MS (r stmt))
Documentation
genModuleWithImports :: OOProg r vis stmt mthd stvr attch prg file mod bod block => Name -> Description -> [Import] -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r Class)))] -> 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 vis stmt mthd prg file mod bod block => 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 vis stmt mthd stvr attch prg file mod bod block => Name -> Description -> [GenState (Maybe (MS (r mthd)))] -> [GenState (Maybe (CS (r Class)))] -> GenState (FS (r file)) Source #
Generates a module for when imports do not need to be explicitly stated.
genModuleProc :: ProcProg r vis stmt mthd prg file mod bod block => 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 :: ClassSym r vis mthd stvr attch => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r Class)) Source #
Generates a primary class.
auxClass :: ClassSym r vis mthd stvr attch => Name -> Maybe Name -> Description -> [CSStateVar r stvr] -> GenState [MS (r mthd)] -> GenState [MS (r mthd)] -> GenState (CS (r Class)) Source #
Generates an auxiliary class (for when a module contains multiple classes).
fApp :: (Argument r, VariableValue r, SelfSym r, InternalValueExp r, ValueExpression r, TypeElim r) => Name -> Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r) 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 :: (Argument r, TypeElim r, ValueExpression r) => Name -> Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r) 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 :: (Argument r, OOValueExpression r, TypeElim r) => Name -> VS (r TypeData) -> [SValue r] -> NamedArgs r -> GenState (SValue r) Source #
Logic similar to fApp, but the self case is not required here
(because constructor will never be private). Calls newObjMixedArgs.