| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Drasil.Shared.RendererClassesCommon
Documentation
class (BodySym r bod block, BlockSym r block stmt, AssignStatement r stmt var val, ScopeSym r scope, DeclStatement r bod stmt var scope val, StringStatement r stmt var val, FuncAppStatement r stmt var val, CommentStatement r stmt, ControlStatement r bod stmt var val, Argument r val, Literal r val typ, MathConstant r val, ValueSym r val typ, VariableSym r var typ, VariableValue r var val, CommandLineArgs r val, NumericExpression r val, BooleanExpression r val, Comparison r val, IndexTranslator r val, List r val, ListStatement r stmt val, InternalList r block var val, VariableElim r var typ, BinderElim r binder typ, RenderBlock r block, BlockElim r block, RenderBody r bod, BodyElim r bod, InternalListFunc r val typ, RenderFunction r typ, FunctionElim r typ, OpElim r, RenderParam r param var, ParamElim r param typ, RenderVisibility r vis, VisibilityElim r vis, InternalAssignStmt r stmt var val, InternalIOStmt r stmt val, InternalControlStmt r stmt val, RenderStatement r stmt, StatementElim r stmt, RenderType r typ, RenderValue r var val typ, ValueElim r val, RenderVariable r var typ, InternalVarElim r var, InternalBinderElim r binder, ImportSym r, UnaryOpSym r, BinaryOpSym r, BlockCommentSym r, BlockCommentElim r, ValueExpression r var val binder typ, TypeSym r typ, MethodTypeSym r typ, RenderMethod r mthd, MethodElim r mthd, ParameterSym r param var, ScopeElim r scope) => CommonRenderSym (r :: Type -> Type) mthd vis param bod block stmt var scope val binder typ Source #
Instances
class ImportSym (r :: Type -> Type) where Source #
Instances
| ImportSym CSharpCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CSharpRenderer | |
| ImportSym CppHdrCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| ImportSym CppSrcCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| ImportSym JavaCode Source # | |
| ImportSym PythonCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.PythonRenderer | |
| ImportSym SwiftCode Source # | |
| ImportSym JuliaCode Source # | |
| ImportSym MatlabCode Source # | |
Defined in Drasil.GProc.LanguageRenderer.MatlabRenderer | |
| Pair p => ImportSym (p CppSrcCode CppHdrCode) Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer Methods langImport :: Label -> p CppSrcCode CppHdrCode Doc Source # modImport :: Label -> p CppSrcCode CppHdrCode Doc Source # | |
class RenderBody (r :: k -> Type) (bod :: k) | r -> bod where Source #
Instances
class BodyElim (r :: k -> Type) (bod :: k) | r -> bod where Source #
Instances
| BodyElim CSharpCode Body Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CSharpRenderer | |
| BodyElim CppHdrCode Body Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| BodyElim CppSrcCode Body Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| BodyElim JavaCode Body Source # | |
| BodyElim PythonCode Body Source # | |
Defined in Drasil.GOOL.LanguageRenderer.PythonRenderer | |
| BodyElim SwiftCode Body Source # | |
| BodyElim JuliaCode Body Source # | |
| BodyElim MatlabCode Body Source # | |
Defined in Drasil.GProc.LanguageRenderer.MatlabRenderer | |
| Pair p => BodyElim (p CppSrcCode CppHdrCode :: Type -> Type) Body Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer Methods body :: p CppSrcCode CppHdrCode Body -> Doc Source # | |
class RenderBlock (r :: k -> Type) (block :: k) | r -> block where Source #
Methods
multiBlock :: [MS (r block)] -> MS (r block) Source #
Instances
class BlockElim (r :: k -> Type) (block :: k) | r -> block where Source #
Instances
| BlockElim CSharpCode Block Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CSharpRenderer | |
| BlockElim CppHdrCode Block Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| BlockElim CppSrcCode Block Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| BlockElim JavaCode Block Source # | |
| BlockElim PythonCode Block Source # | |
Defined in Drasil.GOOL.LanguageRenderer.PythonRenderer | |
| BlockElim SwiftCode Block Source # | |
| BlockElim JuliaCode Block Source # | |
| BlockElim MatlabCode Block Source # | |
Defined in Drasil.GProc.LanguageRenderer.MatlabRenderer | |
| Pair p => BlockElim (p CppSrcCode CppHdrCode :: Type -> Type) Block Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer Methods block :: p CppSrcCode CppHdrCode Block -> Doc Source # | |
class RenderType (r :: k -> Type) (typ :: k) | r -> typ where Source #
Instances
class UnaryOpSym (r :: Type -> Type) where Source #
Methods
Instances
class BinaryOpSym (r :: Type -> Type) where Source #
Methods
notEqualOp :: VSBinOp r Source #
greaterOp :: VSBinOp r Source #
greaterEqualOp :: VSBinOp r Source #
lessEqualOp :: VSBinOp r Source #
divideOp :: VSBinOp r Source #
Instances
class OpElim (r :: Type -> Type) where Source #
Methods
uOp :: r OpData -> Doc Source #
bOp :: r OpData -> Doc Source #
Instances
| OpElim CSharpCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CSharpRenderer | |
| OpElim CppHdrCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| OpElim CppSrcCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer | |
| OpElim JavaCode Source # | |
| OpElim PythonCode Source # | |
Defined in Drasil.GOOL.LanguageRenderer.PythonRenderer | |
| OpElim SwiftCode Source # | |
| OpElim JuliaCode Source # | |
| OpElim MatlabCode Source # | |
Defined in Drasil.GProc.LanguageRenderer.MatlabRenderer | |
| Pair p => OpElim (p CppSrcCode CppHdrCode) Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer Methods uOp :: p CppSrcCode CppHdrCode OpData -> Doc Source # bOp :: p CppSrcCode CppHdrCode OpData -> Doc Source # uOpPrec :: p CppSrcCode CppHdrCode OpData -> Int Source # bOpPrec :: p CppSrcCode CppHdrCode OpData -> Int Source # | |
class RenderVariable (r :: k -> Type) (var :: k) (typ :: k) | r -> var typ where Source #
Methods
varFromData :: AttachmentTag -> String -> VS (r typ) -> Doc -> VS (r var) Source #
Instances
class InternalVarElim (r :: k -> Type) (var :: k) | r -> var where Source #
Instances
class InternalBinderElim (r :: k -> Type) (binder :: k) where Source #
Methods
binderElim :: r binder -> Doc Source #
Instances
class RenderValue (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ where Source #
Methods
inputFunc :: VS (r val) Source #
printFunc :: VS (r val) Source #
printLnFunc :: VS (r val) Source #
printFileFunc :: VS (r val) -> VS (r val) Source #
printFileLnFunc :: VS (r val) -> VS (r val) Source #
cast :: VS (r typ) -> VS (r val) -> VS (r val) Source #
call :: Maybe Library -> Maybe Doc -> MixedCall r var val typ Source #
Very generic internal function for generating calls, to reduce repeated code throughout generators. Parameters are: maybe name of external module, maybe Doc for object variable (including separator between object and function) for method calls.
valFromData :: Maybe Int -> Maybe Integer -> VS (r typ) -> Doc -> VS (r val) Source #
Instances
class ValueElim (r :: k -> Type) (val :: k) | r -> val where Source #
Instances
| ValueElim CSharpCode Value Source # | |
| ValueElim CppHdrCode Value Source # | |
| ValueElim CppSrcCode Value Source # | |
| ValueElim JavaCode Value Source # | |
| ValueElim PythonCode Value Source # | |
| ValueElim SwiftCode Value Source # | |
| ValueElim JuliaCode Value Source # | |
| ValueElim MatlabCode Value Source # | |
| Pair p => ValueElim (p CppSrcCode CppHdrCode :: Type -> Type) Value Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CppRenderer Methods valuePrec :: p CppSrcCode CppHdrCode Value -> Maybe Int Source # valueInt :: p CppSrcCode CppHdrCode Value -> Maybe Integer Source # value :: p CppSrcCode CppHdrCode Value -> Doc Source # | |
class InternalListFunc (r :: Type -> Type) val typ | r -> val typ where Source #
Instances
class RenderFunction (r :: Type -> Type) typ | r -> typ where Source #
Instances
class FunctionElim (r :: Type -> Type) typ | r -> typ where Source #
Instances
class InternalAssignStmt (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #
Instances
class InternalIOStmt (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where Source #
Instances
class InternalControlStmt (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where Source #
Methods
multiReturn :: [VS (r val)] -> MS (r stmt) Source #
Instances
class RenderStatement (r :: k -> Type) (stmt :: k) | r -> stmt where Source #
Methods
stmt :: MS (r stmt) -> MS (r stmt) Source #
loopStmt :: MS (r stmt) -> MS (r stmt) Source #
stmtFromData :: Doc -> Terminator -> MS (r stmt) Source #
Instances
class StatementElim (r :: k -> Type) (stmt :: k) | r -> stmt where Source #
Instances
class RenderVisibility (r :: k -> Type) (vis :: k) | r -> vis where Source #
Methods
visibilityFromData :: VisibilityTag -> Doc -> r vis Source #
Instances
class VisibilityElim (r :: k -> Type) (vis :: k) | r -> vis where Source #
Methods
visibility :: r vis -> Doc Source #
Instances
class MethodTypeSym (r :: k -> Type) (typ :: k) | r -> typ where Source #
Instances
class RenderParam (r :: k -> Type) (param :: k) (var :: k) | r -> param var where Source #
Instances
class ParamElim (r :: k -> Type) (param :: k) (typ :: k) | r -> param typ where Source #
Instances
class RenderMethod (r :: Type -> Type) mthd | r -> mthd where Source #
Methods
commentedFunc :: MS (r Doc) -> MS (r mthd) -> MS (r mthd) Source #
Takes a BlockComment and a method and generates a function.
mthdFromData :: VisibilityTag -> Doc -> MS (r mthd) Source #
Instances
class MethodElim (r :: k -> Type) (mthd :: k) | r -> mthd where Source #
Instances
| MethodElim CSharpCode MethodData Source # | |
Defined in Drasil.GOOL.LanguageRenderer.CSharpRenderer Methods method :: CSharpCode MethodData -> Doc Source # | |
| MethodElim JavaCode MethodData Source # | |
Defined in Drasil.GOOL.LanguageRenderer.JavaRenderer | |
| MethodElim PythonCode MethodData Source # | |
Defined in Drasil.GOOL.LanguageRenderer.PythonRenderer Methods method :: PythonCode MethodData -> Doc Source # | |
| MethodElim SwiftCode MethodData Source # | |
Defined in Drasil.GOOL.LanguageRenderer.SwiftRenderer | |
| MethodElim JuliaCode MethodData Source # | |
Defined in Drasil.GProc.LanguageRenderer.JuliaRenderer | |
| MethodElim MatlabCode MethodData Source # | |
Defined in Drasil.GProc.LanguageRenderer.MatlabRenderer Methods method :: MatlabCode MethodData -> Doc Source # | |
class BlockCommentSym (r :: Type -> Type) where Source #
Methods
blockComment :: [String] -> r Doc Source #
docComment :: State a [String] -> State a (r Doc) Source #
Converts a list of strings into a block comment
Instances
class BlockCommentElim (r :: Type -> Type) where Source #
Methods
blockComment' :: r Doc -> Doc Source #
Instances
class ScopeElim (r :: Type -> Type) scope | r -> scope where Source #