drasil-gool-0.1.1.0: A framework for code and document generation for scientific software - GOOL SubPackage
Safe HaskellNone
LanguageGHC2024

Drasil.GOOL

Description

re-export smart constructors for external code writing

Synopsis

Documentation

type GSProgram (a :: k -> Type) (prg :: k) = GS (a prg) Source #

type Body = Doc Source #

type CS = State ClassState Source #

type FS = State FileState Source #

type MS = State MethodState Source #

type VS = State ValueState Source #

type SVariable (a :: Type -> Type) = VS (a Variable) Source #

type SValue (a :: Type -> Type) = VS (a Value) Source #

type CSStateVar (r :: k -> Type) (stvr :: k) = CS (r stvr) Source #

type Class = Doc Source #

type NamedArgs (r :: Type -> Type) = [(SVariable r, SValue r)] Source #

type Initializers (r :: Type -> Type) = [(SVariable r, SValue r)] Source #

class (UnRepr r TypeData, Argument r, BodySym r bod block, BlockSym r block stmt, CommandLineArgs r, Literal r, MathConstant r, OOVariableValue r, BooleanExpression r, Comparison r, NumericExpression r, InternalValueExp r, OOValueExpression r, Array r, List r, ListStatement r stmt, Reference r, Set r, OOFunctionSym r, ParameterSym r, VariableValue r, ScopeSym r, BinderSym r, InternalList r block, MethodSym r vis mthd bod, OOMethodSym r vis mthd attch bod, ClassSym r vis mthd stvr attch, TypeElim r, VariableElim r, EmptyStatement r stmt, MultiStatement r stmt, ValueStatement r stmt, CommentStatement r stmt, OODeclStatement r stmt bod, AssignStatement r stmt, OOFuncAppStatement r stmt, ControlStatement r stmt bod, StringStatement r stmt, PrintConsole r stmt, ReadConsole r stmt, FileHandling r stmt, PrintFile r stmt, ReadFile r stmt, ModuleSym r mod mthd, FileSym r file mod, ProgramSym r prg file) => OOProg (r :: Type -> Type) vis stmt mthd stvr attch prg file mod bod block Source #

Wrapper typeclass that bundles everything essential for generating an object-oriented program.

Instances

Instances details
OOProg r vis stmt mthd stvr attch prg file mod bod block => OOProg (LoggingFor r) vis stmt mthd stvr attch prg file mod bod block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ProgramSym (r :: k -> Type) (prg :: k) (file :: k) | r -> prg file where Source #

Class for representing a program. Usually ProgData is used for the representation.

Methods

prog :: Label -> Label -> [FS (r file)] -> GSProgram r prg Source #

Given program name, program purpose, and list of files, Generates a representation of a program.

Instances

Instances details
ProgramSym r prg file => ProgramSym (LoggingFor r :: Type -> Type) (prg :: Type) (file :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

prog :: Label -> Label -> [FS (LoggingFor r file)] -> GSProgram (LoggingFor r) prg Source #

class FileSym (r :: k -> Type) (file :: k) (mod :: k) | r -> file mod where Source #

Class for representing a file.

Methods

fileDoc :: FS (r mod) -> FS (r file) Source #

Given a module, generates a representation of a file. (Implicit assumption: exactly one module per file)

docMod :: String -> String -> [String] -> String -> FS (r file) -> FS (r file) Source #

Given module description, watermark, list of author names, date as a String, and file to comment, creates a documented module (i.e. module with a header comment)

Instances

Instances details
FileSym r file mod => FileSym (LoggingFor r :: Type -> Type) (file :: Type) (mod :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

fileDoc :: FS (LoggingFor r mod) -> FS (LoggingFor r file) Source #

docMod :: String -> String -> [String] -> String -> FS (LoggingFor r file) -> FS (LoggingFor r file) Source #

class AttachmentSym (r :: k -> Type) (attch :: k) | r -> attch where Source #

Used to differentiate whether a member is attached to the class or the instance

Methods

classLevel :: r attch Source #

instanceLevel :: r attch Source #

Instances

Instances details
AttachmentSym r attch => AttachmentSym (LoggingFor r :: Type -> Type) (attch :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class BodySym (r :: k -> Type) (bod :: k) (block :: k) | r -> bod block where Source #

Class for representing a Body, which is basically a lexical scope of code. Examples include a function body, the branch(es) of an `if`-statement, etc.

Methods

body :: [MS (r block)] -> MS (r bod) Source #

Given a list of blocks, create a Body of them.

addComments :: Label -> MS (r bod) -> MS (r bod) Source #

Given a comment and a body, add the comment as a header for the body.

Instances

Instances details
BodySym r bod block => BodySym (LoggingFor r :: Type -> Type) (bod :: Type) (block :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

body :: [MS (LoggingFor r block)] -> MS (LoggingFor r bod) Source #

addComments :: Label -> MS (LoggingFor r bod) -> MS (LoggingFor r bod) Source #

bodyStatements :: forall {k} r (block :: k) (stmt :: k) (bod :: k). (BlockSym r block stmt, BodySym r bod block) => [MS (r stmt)] -> MS (r bod) Source #

oneLiner :: forall {k} r (block :: k) (stmt :: k) (bod :: k). (BlockSym r block stmt, BodySym r bod block) => MS (r stmt) -> MS (r bod) Source #

class BlockSym (r :: k -> Type) (block :: k) (stmt :: k) | r -> block stmt where Source #

Class for representing a block of code. A block is a series of statements grouped together, not for use by the compiler/interpreter but to improve readability of the generated code. See the bottom of page 2 of Brook's GOOL paper from 2020 for more details.

Methods

block :: [MS (r stmt)] -> MS (r block) Source #

Instances

Instances details
BlockSym r block stmt => BlockSym (LoggingFor r :: Type -> Type) (block :: Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

block :: [MS (LoggingFor r stmt)] -> MS (LoggingFor r block) Source #

class TypeSym (r :: Type -> Type) where Source #

Class for representing a type.

class TypeSym r => OOTypeSym (r :: Type -> Type) where Source #

Methods

obj :: ClassName -> VS (r TypeData) Source #

Instances

Instances details
OOTypeSym r => OOTypeSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

obj :: ClassName -> VS (LoggingFor r TypeData) Source #

class TypeSym r => BinderSym (r :: Type -> Type) where Source #

A class for representing a binder, i.e. the binding of a variable name to a type, scope, etc. As of July 2026, integration of this typeclass is still WIP, blocked by issues with our variable map.

Methods

binder :: Label -> VS (r TypeData) -> VSBinder r Source #

Instances

Instances details
BinderSym r => BinderSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

binder :: Label -> VS (LoggingFor r TypeData) -> VSBinder (LoggingFor r) Source #

class EmptyStatement (r :: k -> Type) (stmt :: k) | r -> stmt where Source #

Methods

emptyStmt :: MS (r stmt) Source #

Empty statement

Instances

Instances details
EmptyStatement r stmt => EmptyStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

emptyStmt :: MS (LoggingFor r stmt) Source #

class MultiStatement (r :: k -> Type) (stmt :: k) | r -> stmt where Source #

Methods

multi :: [MS (r stmt)] -> MS (r stmt) Source #

Consolidates a list of statements into a single statement

Instances

Instances details
MultiStatement r stmt => MultiStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

multi :: [MS (LoggingFor r stmt)] -> MS (LoggingFor r stmt) Source #

class ValueStatement (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

valStmt :: SValue r -> MS (r stmt) Source #

Converts a value to statement

Instances

Instances details
ValueStatement r stmt => ValueStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valStmt :: SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

class VariableSym r => AssignStatement (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

(&-=) :: SVariable r -> SValue r -> MS (r stmt) infixl 1 Source #

(&+=) :: SVariable r -> SValue r -> MS (r stmt) infixl 1 Source #

(&++) :: SVariable r -> MS (r stmt) infixl 8 Source #

(&--) :: SVariable r -> MS (r stmt) infixl 8 Source #

assign :: SVariable r -> SValue r -> MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, AssignStatement r stmt, FileHandling r stmt, PrintFile r stmt, VariableValue r, VariableElim r, Literal r) => AssignStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(&=) :: AssignStatement r stmt => SVariable r -> SValue r -> MS (r stmt) infixr 1 Source #

class (VariableSym r, ScopeSym r) => DeclStatement (r :: Type -> Type) stmt bod | r -> stmt bod where Source #

Methods

varDec :: SVariable r -> r ScopeData -> MS (r stmt) Source #

Declare a variable without giving it a value. Not for use with arrays; use arrayDec instead.

varDecDef :: SVariable r -> r ScopeData -> SValue r -> MS (r stmt) Source #

Declare a variable and give it a value. Not for use with arrays; use arrayDecDef instead.

listDec :: Integer -> SVariable r -> r ScopeData -> MS (r stmt) Source #

Given the size of the list, the variable to store the list in, and the scope of the variable, declare a list of the given size.

listDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MS (r stmt) Source #

setDec :: SVariable r -> r ScopeData -> MS (r stmt) Source #

setDecDef :: SVariable r -> r ScopeData -> SValue r -> MS (r stmt) Source #

arrayDec :: Integer -> SValue r -> SVariable r -> r ScopeData -> MS (r stmt) Source #

Given the size of the aray, the default value to fill the array with, the variable to store the array in, and the scope of the variable, declare an array of the given size.

arrayDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MS (r stmt) Source #

constDecDef :: SVariable r -> r ScopeData -> SValue r -> MS (r stmt) Source #

funcDecDef :: SVariable r -> r ScopeData -> [SVariable r] -> MS (r bod) -> MS (r stmt) Source #

class (DeclStatement r stmt bod, OOVariableSym r) => OODeclStatement (r :: Type -> Type) stmt bod where Source #

Methods

objDecDef :: SVariable r -> r ScopeData -> SValue r -> MS (r stmt) Source #

objDecNew :: SVariable r -> r ScopeData -> [SValue r] -> MS (r stmt) Source #

extObjDecNew :: Library -> SVariable r -> r ScopeData -> [SValue r] -> MS (r stmt) Source #

Instances

Instances details
(DeclStatement (LoggingFor r) stmt bod, OODeclStatement r stmt bod) => OODeclStatement (LoggingFor r) stmt bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

objDecNewNoParams :: OODeclStatement r stmt bod => SVariable r -> r ScopeData -> MS (r stmt) Source #

extObjDecNewNoParams :: OODeclStatement r stmt bod => Library -> SVariable r -> r ScopeData -> MS (r stmt) Source #

class VariableSym r => PrintConsole (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

print :: SValue r -> MS (r stmt) Source #

printLn :: SValue r -> MS (r stmt) Source #

printStr :: String -> MS (r stmt) Source #

printStrLn :: String -> MS (r stmt) Source #

Instances

Instances details
PrintConsole r stmt => PrintConsole (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class VariableSym r => ReadConsole (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

getInput :: SVariable r -> MS (r stmt) Source #

discardInput :: MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, FileHandling r stmt, PrintFile r stmt, ReadConsole r stmt, VariableValue r, VariableElim r, Literal r) => ReadConsole (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class VariableSym r => FileHandling (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

openFileR :: SVariable r -> SValue r -> MS (r stmt) Source #

openFileW :: SVariable r -> SValue r -> MS (r stmt) Source #

openFileA :: SVariable r -> SValue r -> MS (r stmt) Source #

closeFile :: SValue r -> MS (r stmt) Source #

Instances

Instances details
FileHandling r stmt => FileHandling (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class VariableSym r => PrintFile (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

printFile :: SValue r -> SValue r -> MS (r stmt) Source #

Given the file handle and value to print, print the value to the file.

printFileLn :: SValue r -> SValue r -> MS (r stmt) Source #

printFileStr :: SValue r -> String -> MS (r stmt) Source #

printFileStrLn :: SValue r -> String -> MS (r stmt) Source #

Instances

Instances details
PrintFile r stmt => PrintFile (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class VariableSym r => ReadFile (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

getFileInput :: SValue r -> SVariable r -> MS (r stmt) Source #

discardFileInput :: SValue r -> MS (r stmt) Source #

getFileInputLine :: SValue r -> SVariable r -> MS (r stmt) Source #

discardFileLine :: SValue r -> MS (r stmt) Source #

getFileInputAll :: SValue r -> SVariable r -> MS (r stmt) Source #

class VariableSym r => StringStatement (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

stringSplit :: Char -> SVariable r -> SValue r -> MS (r stmt) Source #

Given a char to split on, variable to store result in, and string to split, generates a statement splitting the string into a list of strings delimited by the char.

stringListVals :: [SVariable r] -> SValue r -> MS (r stmt) Source #

stringListLists :: [SVariable r] -> SValue r -> MS (r stmt) Source #

Given a list of variables and a value containing a list of strings, assign the ith element of the list of strings into the ith variable

class VariableSym r => FuncAppStatement (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

inOutCall :: InOutCall r stmt Source #

extInOutCall :: Library -> InOutCall r stmt Source #

Instances

Instances details
FuncAppStatement r stmt => FuncAppStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) stmt Source #

extInOutCall :: Library -> InOutCall (LoggingFor r) stmt Source #

class (FuncAppStatement r stmt, OOVariableSym r) => OOFuncAppStatement (r :: Type -> Type) stmt where Source #

Methods

selfInOutCall :: InOutCall r stmt Source #

Instances

Instances details
OOFuncAppStatement r stmt => OOFuncAppStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

selfInOutCall :: InOutCall (LoggingFor r) stmt Source #

class CommentStatement (r :: k -> Type) (stmt :: k) | r -> stmt where Source #

Methods

comment :: String -> MS (r stmt) Source #

Instances

Instances details
CommentStatement r stmt => CommentStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

comment :: String -> MS (LoggingFor r stmt) Source #

initObserverList :: DeclStatement r stmt bod => VS (r TypeData) -> [SValue r] -> r ScopeData -> MS (r stmt) Source #

addObserver :: (OOVariableValue r, List r, ListStatement r stmt) => SValue r -> MS (r stmt) Source #

class VariableSym r => ControlStatement (r :: Type -> Type) stmt bod | r -> stmt bod where Source #

Methods

break :: MS (r stmt) Source #

continue :: MS (r stmt) Source #

returnStmt :: SValue r -> MS (r stmt) Source #

throw :: Label -> MS (r stmt) Source #

ifCond :: [(SValue r, MS (r bod))] -> MS (r bod) -> MS (r stmt) Source #

String of if-else statements. Arguments: List of predicates and bodies (if this then that), Body for else branch

switch :: SValue r -> [(SValue r, MS (r bod))] -> MS (r bod) -> MS (r stmt) Source #

ifExists :: SValue r -> MS (r bod) -> MS (r bod) -> MS (r stmt) Source #

for :: MS (r stmt) -> SValue r -> MS (r stmt) -> MS (r bod) -> MS (r stmt) Source #

forRange :: SVariable r -> SValue r -> SValue r -> SValue r -> MS (r bod) -> MS (r stmt) Source #

forEach :: SVariable r -> SValue r -> MS (r bod) -> MS (r stmt) Source #

while :: SValue r -> MS (r bod) -> MS (r stmt) Source #

tryCatch :: MS (r bod) -> MS (r bod) -> MS (r stmt) Source #

assert :: SValue r -> SValue r -> MS (r stmt) Source #

Instances

Instances details
ControlStatement r stmt bod => ControlStatement (LoggingFor r) stmt bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

break :: MS (LoggingFor r stmt) Source #

continue :: MS (LoggingFor r stmt) Source #

returnStmt :: SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

throw :: Label -> MS (LoggingFor r stmt) Source #

ifCond :: [(SValue (LoggingFor r), MS (LoggingFor r bod))] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

switch :: SValue (LoggingFor r) -> [(SValue (LoggingFor r), MS (LoggingFor r bod))] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

ifExists :: SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

for :: MS (LoggingFor r stmt) -> SValue (LoggingFor r) -> MS (LoggingFor r stmt) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forRange :: SVariable (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forEach :: SVariable (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

while :: SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

tryCatch :: MS (LoggingFor r bod) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

assert :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

ifNoElse :: (BodySym r bod block, ControlStatement r stmt bod) => [(SValue r, MS (r bod))] -> MS (r stmt) Source #

switchAsIf :: (ControlStatement r stmt bod, Comparison r) => SValue r -> [(SValue r, MS (r bod))] -> MS (r bod) -> MS (r stmt) Source #

class TypeSym r => VariableSym (r :: Type -> Type) where Source #

Class for representing variables.

Methods

var :: Label -> VS (r TypeData) -> SVariable r Source #

An instance- or function-level variable, separate from its instance (i.e. v, not `o.v`)

constant :: Label -> VS (r TypeData) -> SVariable r Source #

An instance- or function-level constant, separate from its instance (i.e. v, not `o.v`)

extVar :: Library -> Label -> VS (r TypeData) -> SVariable r Source #

An instance- or module-level variable from an external library. Given library Lib, variable name v, and variable type t, it performs the necessary imports and creates v

class ScopeSym (r :: Type -> Type) where Source #

Class for representing the lexical scope of a variable. Currently only differentiates global and local, allowing individual renderers to define which of them the main function is.

class (VariableSym r, OOTypeSym r) => OOVariableSym (r :: Type -> Type) where Source #

Methods

classVar :: Label -> VS (r TypeData) -> SVariable r Source #

A class-level variable, separate from its class (i.e. v, not v)

classConst :: Label -> VS (r TypeData) -> SVariable r Source #

A class-level constant, separate from its class (i.e. v, not v)

classVarAccess :: VS (r TypeData) -> SVariable r -> SVariable r Source #

Given a class C and a class-level variable v, creates v

extClassVarAccess :: VS (r TypeData) -> SVariable r -> SVariable r Source #

Given a class C from an external module and a class-level variable v, performs any necessary imports and creates v

instanceVarAccess :: SValue r -> SVariable r -> SVariable r Source #

Given an instance i and an instance-level variable v, creates `i.v`

class OOVariableSym r => SelfSym (r :: Type -> Type) where Source #

Methods

self :: SVariable r Source #

self keyword

Instances

Instances details
SelfSym r => SelfSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

instanceVarSelf :: (SelfSym r, VariableValue r) => SVariable r -> SVariable r Source #

Given a variable v, creates `self.v`

class VariableSym r => VariableElim (r :: Type -> Type) where Source #

Methods

variableName :: r Variable -> String Source #

variableType :: r Variable -> r TypeData Source #

Instances

Instances details
VariableElim r => VariableElim (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

($->) :: OOVariableSym r => SValue r -> SVariable r -> SVariable r infixl 9 Source #

class TypeSym r => ValueSym (r :: Type -> Type) where Source #

Class for representing a value.

Methods

valueType :: r Value -> r TypeData Source #

Instances

Instances details
ValueSym r => ValueSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => Argument (r :: Type -> Type) where Source #

Methods

pointerArg :: SValue r -> SValue r Source #

Instances

Instances details
Argument r => Argument (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => MathConstant (r :: Type -> Type) where Source #

Methods

pi :: SValue r Source #

Instances

Instances details
MathConstant r => MathConstant (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: SValue (LoggingFor r) Source #

class (VariableSym r, ValueSym r) => VariableValue (r :: Type -> Type) where Source #

Methods

valueOf :: SVariable r -> SValue r Source #

Instances

Instances details
VariableValue r => VariableValue (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class (VariableValue r, OOVariableSym r, SelfSym r) => OOVariableValue (r :: Type -> Type) Source #

Instances

Instances details
OOVariableValue r => OOVariableValue (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => NumericExpression (r :: Type -> Type) where Source #

Methods

(#~) :: SValue r -> SValue r infixl 8 Source #

(#/^) :: SValue r -> SValue r infixl 7 Source #

(#|) :: SValue r -> SValue r infixl 7 Source #

(#+) :: SValue r -> SValue r -> SValue r infixl 5 Source #

(#-) :: SValue r -> SValue r -> SValue r infixl 5 Source #

(#*) :: SValue r -> SValue r -> SValue r infixl 6 Source #

(#/) :: SValue r -> SValue r -> SValue r infixl 6 Source #

(#%) :: SValue r -> SValue r -> SValue r infixl 6 Source #

(#^) :: SValue r -> SValue r -> SValue r infixl 7 Source #

log :: SValue r -> SValue r Source #

ln :: SValue r -> SValue r Source #

exp :: SValue r -> SValue r Source #

sin :: SValue r -> SValue r Source #

cos :: SValue r -> SValue r Source #

tan :: SValue r -> SValue r Source #

csc :: SValue r -> SValue r Source #

sec :: SValue r -> SValue r Source #

cot :: SValue r -> SValue r Source #

arcsin :: SValue r -> SValue r Source #

arccos :: SValue r -> SValue r Source #

arctan :: SValue r -> SValue r Source #

floor :: SValue r -> SValue r Source #

ceil :: SValue r -> SValue r Source #

Instances

Instances details
NumericExpression r => NumericExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(#~) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#/^) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#|) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#+) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#-) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#*) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#/) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#%) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#^) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

log :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

ln :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

exp :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

sin :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

cos :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

tan :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

csc :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

sec :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

cot :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arcsin :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arccos :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arctan :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

floor :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

ceil :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

class ValueSym r => BooleanExpression (r :: Type -> Type) where Source #

Methods

(?!) :: SValue r -> SValue r infixr 6 Source #

(?&&) :: SValue r -> SValue r -> SValue r infixl 2 Source #

(?||) :: SValue r -> SValue r -> SValue r infixl 1 Source #

class ValueSym r => Comparison (r :: Type -> Type) where Source #

Methods

(?<) :: SValue r -> SValue r -> SValue r infixl 4 Source #

(?<=) :: SValue r -> SValue r -> SValue r infixl 4 Source #

(?>) :: SValue r -> SValue r -> SValue r infixl 4 Source #

(?>=) :: SValue r -> SValue r -> SValue r infixl 4 Source #

(?==) :: SValue r -> SValue r -> SValue r infixl 3 Source #

(?!=) :: SValue r -> SValue r -> SValue r infixl 3 Source #

class (VariableSym r, ValueSym r) => ValueExpression (r :: Type -> Type) where Source #

A class for representing values that can include expressions

Methods

inlineIf :: SValue r -> SValue r -> SValue r -> SValue r Source #

funcAppMixedArgs :: MixedCall r Source #

extFuncAppMixedArgs :: Library -> MixedCall r Source #

libFuncAppMixedArgs :: Library -> MixedCall r Source #

lambda :: [VSBinder r] -> SValue r -> SValue r Source #

notNull :: SValue r -> SValue r Source #

Instances

Instances details
ValueExpression r => ValueExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => InternalValueExp (r :: Type -> Type) Source #

A class for representing method calls, both instance- and class-level

Minimal complete definition

objMethodCallMixedArgs', classMethodCallMixedArgs'

class (ValueExpression r, OOVariableSym r, OOValueSym r) => OOValueExpression (r :: Type -> Type) where Source #

Methods

newObjMixedArgs :: MixedCtorCall r Source #

extNewObjMixedArgs :: Library -> MixedCtorCall r Source #

libNewObjMixedArgs :: Library -> MixedCtorCall r Source #

Instances

Instances details
OOValueExpression r => OOValueExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

newObjMixedArgs :: MixedCtorCall (LoggingFor r) Source #

extNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor r) Source #

libNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor r) Source #

funcApp :: ValueExpression r => PosCall r Source #

extFuncApp :: ValueExpression r => Library -> PosCall r Source #

libFuncApp :: ValueExpression r => Library -> PosCall r Source #

newObj :: OOValueExpression r => PosCtorCall r Source #

extNewObj :: OOValueExpression r => Library -> PosCtorCall r Source #

libNewObj :: OOValueExpression r => Library -> PosCtorCall r Source #

objMethodCall :: InternalValueExp r => VS (r TypeData) -> SValue r -> Label -> [SValue r] -> SValue r Source #

Calling a method. t is the return type of the method, o is the object, f is the method name, and ps is a list of positional arguments.

objMethodCallNamedArgs :: InternalValueExp r => VS (r TypeData) -> SValue r -> Label -> NamedArgs r -> SValue r Source #

Calling a method with named arguments.

objMethodCallMixedArgs :: InternalValueExp r => VS (r TypeData) -> SValue r -> Label -> [SValue r] -> NamedArgs r -> SValue r Source #

Calling a method with a mix of positional and named arguments.

objMethodCallNoParams :: InternalValueExp r => VS (r TypeData) -> SValue r -> Label -> SValue r Source #

Calling a method with no parameters.

classMethodCall :: InternalValueExp r => VS (r TypeData) -> VS (r TypeData) -> Label -> [SValue r] -> SValue r Source #

Calling a class method. t is the return type of the method, c is the class, f is the method name, and ps is a list of positional arguments.

classMethodCallNamedArgs :: InternalValueExp r => VS (r TypeData) -> VS (r TypeData) -> Label -> NamedArgs r -> SValue r Source #

Calling a class method with named arguments.

classMethodCallMixedArgs :: InternalValueExp r => VS (r TypeData) -> VS (r TypeData) -> Label -> [SValue r] -> NamedArgs r -> SValue r Source #

Calling a class method with a mix of positional and named arguments.

classMethodCallNoParams :: InternalValueExp r => VS (r TypeData) -> VS (r TypeData) -> Label -> SValue r Source #

Calling a class method with no parameters.

class ValueSym r => FunctionSym (r :: Type -> Type) Source #

Instances

Instances details
FunctionSym r => FunctionSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class FunctionSym r => OOFunctionSym (r :: Type -> Type) where Source #

Methods

func :: Label -> VS (r TypeData) -> [SValue r] -> VS (r FuncData) Source #

objAccess :: SValue r -> VS (r FuncData) -> SValue r Source #

Instances

Instances details
OOFunctionSym r => OOFunctionSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

func :: Label -> VS (LoggingFor r TypeData) -> [SValue (LoggingFor r)] -> VS (LoggingFor r FuncData) Source #

objAccess :: SValue (LoggingFor r) -> VS (LoggingFor r FuncData) -> SValue (LoggingFor r) Source #

($.) :: OOFunctionSym r => SValue r -> VS (r FuncData) -> SValue r infixl 9 Source #

selfAccess :: (OOVariableValue r, OOFunctionSym r) => VS (r FuncData) -> SValue r Source #

class (ValueSym r, VariableSym r) => GetSet (r :: Type -> Type) where Source #

Methods

get :: SValue r -> SVariable r -> SValue r Source #

set :: SValue r -> SVariable r -> SValue r -> SValue r Source #

Instances

Instances details
GetSet r => GetSet (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class (TypeSym r, ValueSym r) => Reference (r :: Type -> Type) where Source #

A class for representing references. By "reference" we basically mean "C++ pointer" or "OCaml reference".

Methods

makeRef :: SValue r -> SValue r Source #

Given a value, convert it to a reference to that value

maybeDeref :: SValue r -> SValue r Source #

Given a value that may be a reference type, apply any necessary dereference operation.

Instances

Instances details
Reference r => Reference (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class IndexTranslator r => Array (r :: Type -> Type) where Source #

Methods

arrayElem :: SValue r -> SValue r -> SVariable r Source #

Given array a and index i, creates `a[i]`

arrayLength :: SValue r -> SValue r Source #

Given an array, return its length

arrayCopy :: SValue r -> SValue r Source #

Given a source array, create a (shallow) copy of it

class IndexTranslator r => List (r :: Type -> Type) where Source #

Methods

listSize :: SValue r -> SValue r Source #

Finds the size of a list. Arguments are: List

listAccess :: SValue r -> SValue r -> SValue r Source #

Gets the value of an index of a list. Arguments are: List, Index

indexOf :: SValue r -> SValue r -> SValue r Source #

Finds the index of the first occurrence of a value in a list. Arguments are: List, Value

class ListStatement (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

listAdd :: SValue r -> SValue r -> SValue r -> MS (r stmt) Source #

Inserts a value into a list. Arguments are: List, Index, Value

listAppend :: SValue r -> SValue r -> MS (r stmt) Source #

Appens a value to a list. Arguments are: List, Value

listSet :: SValue r -> SValue r -> SValue r -> MS (r stmt) Source #

Sets the value of an index of a list. Arguments are: List, Index, Value

Instances

Instances details
ListStatement r stmt => ListStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => InternalList (r :: Type -> Type) block | r -> block Source #

Minimal complete definition

listSlice'

Instances

Instances details
InternalList r block => InternalList (LoggingFor r) block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

listSlice :: InternalList r block => SVariable r -> SValue r -> Maybe (SValue r) -> Maybe (SValue r) -> Maybe (SValue r) -> MS (r block) Source #

Creates a slice of a list and assigns it to a variable. Arguments are: Variable to assign List to read from (optional) Start index inclusive. (if Nothing, then list start if step > 0, list end if step < 0) (optional) End index exclusive. (if Nothing, then list end if step > 0, list start if step > 0) (optional) Step (if Nothing, then defaults to 1)

class ValueSym r => Set (r :: Type -> Type) where Source #

Methods

contains :: SValue r -> SValue r -> SValue r Source #

Checks membership Arguments are: Set, Value

setAdd :: SValue r -> SValue r -> SValue r Source #

Inserts a value into a set Arguments are: Set, Value

setRemove :: SValue r -> SValue r -> SValue r Source #

Removes a value from a set Arguments are: Set, Value

setUnion :: SValue r -> SValue r -> SValue r Source #

Removes a value from a set Arguments are: Set, Set

at :: List r => SValue r -> SValue r -> SValue r Source #

class OOFunctionSym r => ObserverPattern (r :: Type -> Type) stmt | r -> stmt where Source #

Methods

notifyObservers :: VS (r FuncData) -> VS (r TypeData) -> MS (r stmt) Source #

Instances

Instances details
ObserverPattern r stmt => ObserverPattern (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

notifyObservers :: VS (LoggingFor r FuncData) -> VS (LoggingFor r TypeData) -> MS (LoggingFor r stmt) Source #

class VariableSym r => StrategyPattern (r :: Type -> Type) bod block | r -> bod block where Source #

Methods

runStrategy :: Label -> [(Label, MS (r bod))] -> Maybe (SValue r) -> Maybe (SVariable r) -> MS (r block) Source #

Instances

Instances details
StrategyPattern r bod block => StrategyPattern (LoggingFor r) bod block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

runStrategy :: Label -> [(Label, MS (LoggingFor r bod))] -> Maybe (SValue (LoggingFor r)) -> Maybe (SVariable (LoggingFor r)) -> MS (LoggingFor r block) Source #

class VisibilitySym (r :: k -> Type) (vis :: k) | r -> vis where Source #

A class for representing Visibility, of a class member, i.e. whether it is public or private.

Methods

private :: r vis Source #

public :: r vis Source #

Instances

Instances details
VisibilitySym r vis => VisibilitySym (LoggingFor r :: Type -> Type) (vis :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class VariableSym r => ParameterSym (r :: Type -> Type) where Source #

A class for representing function/method parameters.

Methods

param :: SVariable r -> MS (r ParamData) Source #

pointerParam :: SVariable r -> MS (r ParamData) Source #

A parameter that is an "alias" type, e.g. a C++ reference. This is a minor hack, to get around us not having/wanting "alias types" in GOOL.

class (ParameterSym r, VisibilitySym r vis) => MethodSym (r :: Type -> Type) vis mthd bod | r -> mthd bod where Source #

A class for representing functions/methods. Usually MethodData is used for the representation.

Methods

docMain :: MS (r bod) -> MS (r mthd) Source #

function :: Label -> r vis -> VS (r TypeData) -> [MS (r ParamData)] -> MS (r bod) -> MS (r mthd) Source #

mainFunction :: MS (r bod) -> MS (r mthd) Source #

docFunc :: String -> [String] -> Maybe String -> MS (r mthd) -> MS (r mthd) Source #

inOutFunc :: Label -> r vis -> InOutFunc r mthd bod Source #

docInOutFunc :: Label -> r vis -> DocInOutFunc r mthd bod Source #

Instances

Instances details
MethodSym r vis mthd bod => MethodSym (LoggingFor r) vis mthd bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

docMain :: MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

function :: Label -> LoggingFor r vis -> VS (LoggingFor r TypeData) -> [MS (LoggingFor r ParamData)] -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

mainFunction :: MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

docFunc :: String -> [String] -> Maybe String -> MS (LoggingFor r mthd) -> MS (LoggingFor r mthd) Source #

inOutFunc :: Label -> LoggingFor r vis -> InOutFunc (LoggingFor r) mthd bod Source #

docInOutFunc :: Label -> LoggingFor r vis -> DocInOutFunc (LoggingFor r) mthd bod Source #

class AttachmentSym r attch => OOMethodSym (r :: Type -> Type) vis mthd attch bod | r -> vis mthd bod where Source #

Methods

method :: Label -> r vis -> r attch -> VS (r TypeData) -> [MS (r ParamData)] -> MS (r bod) -> MS (r mthd) Source #

getMethod :: SVariable r -> MS (r mthd) Source #

setMethod :: SVariable r -> MS (r mthd) Source #

constructor :: [MS (r ParamData)] -> Initializers r -> MS (r bod) -> MS (r mthd) Source #

inOutMethod :: Label -> r vis -> r attch -> InOutFunc r mthd bod Source #

docInOutMethod :: Label -> r vis -> r attch -> DocInOutFunc r mthd bod Source #

Instances

Instances details
OOMethodSym r vis mthd attch bod => OOMethodSym (LoggingFor r) vis mthd attch bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

method :: Label -> LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r TypeData) -> [MS (LoggingFor r ParamData)] -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

getMethod :: SVariable (LoggingFor r) -> MS (LoggingFor r mthd) Source #

setMethod :: SVariable (LoggingFor r) -> MS (LoggingFor r mthd) Source #

constructor :: [MS (LoggingFor r ParamData)] -> Initializers (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

inOutMethod :: Label -> LoggingFor r vis -> LoggingFor r attch -> InOutFunc (LoggingFor r) mthd bod Source #

docInOutMethod :: Label -> LoggingFor r vis -> LoggingFor r attch -> DocInOutFunc (LoggingFor r) mthd bod Source #

privMethod :: (OOMethodSym r vis mthd attch bod, VisibilitySym r vis) => Label -> VS (r TypeData) -> [MS (r ParamData)] -> MS (r bod) -> MS (r mthd) Source #

pubMethod :: (OOMethodSym r vis mthd attch bod, VisibilitySym r vis) => Label -> VS (r TypeData) -> [MS (r ParamData)] -> MS (r bod) -> MS (r mthd) Source #

initializer :: (OOMethodSym r vis mthd attch bod, BodySym r bod block) => [MS (r ParamData)] -> Initializers r -> MS (r mthd) Source #

nonInitConstructor :: OOMethodSym r vis mthd attch bod => [MS (r ParamData)] -> MS (r bod) -> MS (r mthd) Source #

class (VisibilitySym r vis, AttachmentSym r attch, VariableSym r) => StateVarSym (r :: Type -> Type) vis stvr attch | r -> stvr where Source #

Class for representing class variables, both instance- and class-level. Used when creating a class, to hold extra information about Attachment and Visibility. Usually Doc is used for the representation.

Methods

stateVar :: r vis -> r attch -> SVariable r -> CSStateVar r stvr Source #

Given a visibility, attachment, and variable, represent the declaration of a state variable with no initial value.

stateVarDef :: r vis -> r attch -> SVariable r -> SValue r -> CSStateVar r stvr Source #

Given a visibility, attachment, variable, and initial value, represent the declaration of a state variable with the given initial value.

constVar :: r vis -> SVariable r -> SValue r -> CSStateVar r stvr Source #

Given a visibility, variable, and value, represent the declaration of a state constant with the given value.

Instances

Instances details
StateVarSym r vis stvr attch => StateVarSym (LoggingFor r) vis stvr attch Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

privDVar :: StateVarSym r vis stvr attch => SVariable r -> CSStateVar r stvr Source #

pubDVar :: StateVarSym r vis stvr attch => SVariable r -> CSStateVar r stvr Source #

pubSVar :: StateVarSym r vis stvr attch => SVariable r -> CSStateVar r stvr Source #

class StateVarSym r vis stvr attch => ClassSym (r :: Type -> Type) vis mthd stvr attch | r -> mthd where Source #

Class for representing an OO class.

Methods

buildClass :: Maybe Label -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r Class) Source #

Main external method for creating a class. Inputs: parent class, variables, constructor(s), methods

extraClass :: Label -> Maybe Label -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r Class) Source #

Creates an extra class, i.e. with a different name than the module name. Inputs: class name, the rest are the same as buildClass.

implementingClass :: Label -> [Label] -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r Class) Source #

Creates a class implementing a list of interfaces. Inputs: class name, interface names, variables, constructor(s), methods

docClass :: String -> CS (r Class) -> CS (r Class) Source #

Instances

Instances details
ClassSym r vis mthd stvr attch => ClassSym (LoggingFor r) vis mthd stvr attch Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildClass :: Maybe Label -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

extraClass :: Label -> Maybe Label -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

implementingClass :: Label -> [Label] -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

docClass :: String -> CS (LoggingFor r Class) -> CS (LoggingFor r Class) Source #

class ModuleSym (r :: Type -> Type) mod mthd | r -> mod mthd where Source #

Class for representing a module.

Methods

buildModule :: Label -> [Label] -> [MS (r mthd)] -> [CS (r Class)] -> FS (r mod) Source #

Given module name, list of import names, list of module functions, and list of module classes, generates a representation of a module.

Instances

Instances details
ModuleSym r mod mthd => ModuleSym (LoggingFor r) mod mthd Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildModule :: Label -> [Label] -> [MS (LoggingFor r mthd)] -> [CS (LoggingFor r Class)] -> FS (LoggingFor r mod) Source #

data VisibilityTag Source #

Constructors

Pub 
Priv 

Instances

Instances details
Eq VisibilityTag Source # 
Instance details

Defined in Drasil.Shared.AST

data CodeType Source #

Instances

Instances details
Show CodeType Source # 
Instance details

Defined in Drasil.Shared.CodeType

Eq CodeType Source # 
Instance details

Defined in Drasil.Shared.CodeType

data GOOLState Source #

Constructors

GS 

Fields

lensMStoVS :: Lens' MethodState ValueState Source #

onStateValue :: (a -> b) -> State s a -> State s b Source #

onCodeList :: Monad m => ([a] -> b) -> [m a] -> m b Source #

unCI :: CodeInfoOO a -> a Source #

unPC :: PythonCode a -> a Source #

unJC :: JavaCode a -> a Source #

unCSC :: CSharpCode a -> a Source #

unCPPC :: CppCode CppSrcCode CppHdrCode a -> a Source #

unSC :: SwiftCode a -> a Source #

newtype LoggingFor (r :: Type -> Type) a Source #

Constructors

LC 

Fields

Instances

Instances details
AttachmentSym r attch => AttachmentSym (LoggingFor r :: Type -> Type) (attch :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

CommentStatement r stmt => CommentStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

comment :: String -> MS (LoggingFor r stmt) Source #

EmptyStatement r stmt => EmptyStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

emptyStmt :: MS (LoggingFor r stmt) Source #

MultiStatement r stmt => MultiStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

multi :: [MS (LoggingFor r stmt)] -> MS (LoggingFor r stmt) Source #

VisibilitySym r vis => VisibilitySym (LoggingFor r :: Type -> Type) (vis :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

FileSym r file mod => FileSym (LoggingFor r :: Type -> Type) (file :: Type) (mod :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

fileDoc :: FS (LoggingFor r mod) -> FS (LoggingFor r file) Source #

docMod :: String -> String -> [String] -> String -> FS (LoggingFor r file) -> FS (LoggingFor r file) Source #

ProgramSym r prg file => ProgramSym (LoggingFor r :: Type -> Type) (prg :: Type) (file :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

prog :: Label -> Label -> [FS (LoggingFor r file)] -> GSProgram (LoggingFor r) prg Source #

FileSym r file mod => FileSym (LoggingFor r :: Type -> Type) (file :: Type) (mod :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

fileDoc :: FS (LoggingFor r mod) -> FS (LoggingFor r file) Source #

docMod :: String -> String -> [String] -> String -> FS (LoggingFor r file) -> FS (LoggingFor r file) Source #

ModuleSym r mod mthd => ModuleSym (LoggingFor r :: Type -> Type) (mod :: Type) (mthd :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildModule :: Label -> [Label] -> [MS (LoggingFor r mthd)] -> FS (LoggingFor r mod) Source #

ProgramSym r prg file => ProgramSym (LoggingFor r :: Type -> Type) (prg :: Type) (file :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

prog :: Label -> Label -> [FS (LoggingFor r file)] -> GSProgram (LoggingFor r) prg Source #

BlockSym r block stmt => BlockSym (LoggingFor r :: Type -> Type) (block :: Type) (stmt :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

block :: [MS (LoggingFor r stmt)] -> MS (LoggingFor r block) Source #

BodySym r bod block => BodySym (LoggingFor r :: Type -> Type) (bod :: Type) (block :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

body :: [MS (LoggingFor r block)] -> MS (LoggingFor r bod) Source #

addComments :: Label -> MS (LoggingFor r bod) -> MS (LoggingFor r bod) Source #

GetSet r => GetSet (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

InternalValueExp r => InternalValueExp (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

OOFunctionSym r => OOFunctionSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

func :: Label -> VS (LoggingFor r TypeData) -> [SValue (LoggingFor r)] -> VS (LoggingFor r FuncData) Source #

objAccess :: SValue (LoggingFor r) -> VS (LoggingFor r FuncData) -> SValue (LoggingFor r) Source #

OOTypeSym r => OOTypeSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

obj :: ClassName -> VS (LoggingFor r TypeData) Source #

OOValueExpression r => OOValueExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

newObjMixedArgs :: MixedCtorCall (LoggingFor r) Source #

extNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor r) Source #

libNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor r) Source #

OOVariableSym r => OOVariableSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

OOVariableValue r => OOVariableValue (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

SelfSym r => SelfSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Argument r => Argument (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Array r => Array (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

BinderSym r => BinderSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

binder :: Label -> VS (LoggingFor r TypeData) -> VSBinder (LoggingFor r) Source #

BooleanExpression r => BooleanExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

CommandLineArgs r => CommandLineArgs (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Comparison r => Comparison (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

FunctionSym r => FunctionSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

List r => List (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Literal r => Literal (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

MathConstant r => MathConstant (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: SValue (LoggingFor r) Source #

NativeVector lang => NativeVector (LoggingFor lang) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

NumericExpression r => NumericExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(#~) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#/^) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#|) :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#+) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#-) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#*) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#/) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#%) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

(#^) :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

log :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

ln :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

exp :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

sin :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

cos :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

tan :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

csc :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

sec :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

cot :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arcsin :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arccos :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

arctan :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

floor :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

ceil :: SValue (LoggingFor r) -> SValue (LoggingFor r) Source #

ParameterSym r => ParameterSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Reference r => Reference (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ScopeSym r => ScopeSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Set r => Set (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

TypeElim r => TypeElim (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

TypeSym r => TypeSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ValueExpression r => ValueExpression (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ValueSym r => ValueSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

VariableElim r => VariableElim (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

VariableSym r => VariableSym (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

VariableValue r => VariableValue (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Applicative r => Applicative (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pure :: a -> LoggingFor r a #

(<*>) :: LoggingFor r (a -> b) -> LoggingFor r a -> LoggingFor r b #

liftA2 :: (a -> b -> c) -> LoggingFor r a -> LoggingFor r b -> LoggingFor r c #

(*>) :: LoggingFor r a -> LoggingFor r b -> LoggingFor r b #

(<*) :: LoggingFor r a -> LoggingFor r b -> LoggingFor r a #

Functor r => Functor (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

fmap :: (a -> b) -> LoggingFor r a -> LoggingFor r b #

(<$) :: a -> LoggingFor r b -> LoggingFor r a #

Monad r => Monad (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(>>=) :: LoggingFor r a -> (a -> LoggingFor r b) -> LoggingFor r b #

(>>) :: LoggingFor r a -> LoggingFor r b -> LoggingFor r b #

return :: a -> LoggingFor r a #

OOFuncAppStatement r stmt => OOFuncAppStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

selfInOutCall :: InOutCall (LoggingFor r) stmt Source #

ObserverPattern r stmt => ObserverPattern (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

notifyObservers :: VS (LoggingFor r FuncData) -> VS (LoggingFor r TypeData) -> MS (LoggingFor r stmt) Source #

(MultiStatement r stmt, AssignStatement r stmt, FileHandling r stmt, PrintFile r stmt, VariableValue r, VariableElim r, Literal r) => AssignStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

FileHandling r stmt => FileHandling (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

FuncAppStatement r stmt => FuncAppStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) stmt Source #

extInOutCall :: Library -> InOutCall (LoggingFor r) stmt Source #

InternalList r block => InternalList (LoggingFor r) block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ListStatement r stmt => ListStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

PrintConsole r stmt => PrintConsole (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

PrintFile r stmt => PrintFile (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(MultiStatement r stmt, FileHandling r stmt, PrintFile r stmt, ReadConsole r stmt, VariableValue r, VariableElim r, Literal r) => ReadConsole (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(MultiStatement r stmt, FileHandling r stmt, PrintFile r stmt, ReadFile r stmt, VariableValue r, VariableElim r, Literal r) => ReadFile (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(MultiStatement r stmt, StringStatement r stmt, FileHandling r stmt, PrintFile r stmt, VariableValue r, VariableElim r, Literal r) => StringStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ValueStatement r stmt => ValueStatement (LoggingFor r) stmt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valStmt :: SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

ModuleSym r mod mthd => ModuleSym (LoggingFor r) mod mthd Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildModule :: Label -> [Label] -> [MS (LoggingFor r mthd)] -> [CS (LoggingFor r Class)] -> FS (LoggingFor r mod) Source #

(DeclStatement (LoggingFor r) stmt bod, OODeclStatement r stmt bod) => OODeclStatement (LoggingFor r) stmt bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

StrategyPattern r bod block => StrategyPattern (LoggingFor r) bod block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

runStrategy :: Label -> [(Label, MS (LoggingFor r bod))] -> Maybe (SValue (LoggingFor r)) -> Maybe (SVariable (LoggingFor r)) -> MS (LoggingFor r block) Source #

ControlStatement r stmt bod => ControlStatement (LoggingFor r) stmt bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

break :: MS (LoggingFor r stmt) Source #

continue :: MS (LoggingFor r stmt) Source #

returnStmt :: SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

throw :: Label -> MS (LoggingFor r stmt) Source #

ifCond :: [(SValue (LoggingFor r), MS (LoggingFor r bod))] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

switch :: SValue (LoggingFor r) -> [(SValue (LoggingFor r), MS (LoggingFor r bod))] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

ifExists :: SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

for :: MS (LoggingFor r stmt) -> SValue (LoggingFor r) -> MS (LoggingFor r stmt) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forRange :: SVariable (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forEach :: SVariable (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

while :: SValue (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

tryCatch :: MS (LoggingFor r bod) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

assert :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r stmt) Source #

(MultiStatement r stmt, DeclStatement r stmt bod, FileHandling r stmt, PrintFile r stmt, VariableValue r, VariableElim r, Literal r) => DeclStatement (LoggingFor r) stmt bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

StateVarSym r vis stvr attch => StateVarSym (LoggingFor r) vis stvr attch Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

MethodSym r vis mthd bod => MethodSym (LoggingFor r) vis mthd bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

docMain :: MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

function :: Label -> LoggingFor r vis -> VS (LoggingFor r TypeData) -> [MS (LoggingFor r ParamData)] -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

mainFunction :: MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

docFunc :: String -> [String] -> Maybe String -> MS (LoggingFor r mthd) -> MS (LoggingFor r mthd) Source #

inOutFunc :: Label -> LoggingFor r vis -> InOutFunc (LoggingFor r) mthd bod Source #

docInOutFunc :: Label -> LoggingFor r vis -> DocInOutFunc (LoggingFor r) mthd bod Source #

ClassSym r vis mthd stvr attch => ClassSym (LoggingFor r) vis mthd stvr attch Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildClass :: Maybe Label -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

extraClass :: Label -> Maybe Label -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

implementingClass :: Label -> [Label] -> [CSStateVar (LoggingFor r) stvr] -> [MS (LoggingFor r mthd)] -> [MS (LoggingFor r mthd)] -> CS (LoggingFor r Class) Source #

docClass :: String -> CS (LoggingFor r Class) -> CS (LoggingFor r Class) Source #

OOMethodSym r vis mthd attch bod => OOMethodSym (LoggingFor r) vis mthd attch bod Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

method :: Label -> LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r TypeData) -> [MS (LoggingFor r ParamData)] -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

getMethod :: SVariable (LoggingFor r) -> MS (LoggingFor r mthd) Source #

setMethod :: SVariable (LoggingFor r) -> MS (LoggingFor r mthd) Source #

constructor :: [MS (LoggingFor r ParamData)] -> Initializers (LoggingFor r) -> MS (LoggingFor r bod) -> MS (LoggingFor r mthd) Source #

inOutMethod :: Label -> LoggingFor r vis -> LoggingFor r attch -> InOutFunc (LoggingFor r) mthd bod Source #

docInOutMethod :: Label -> LoggingFor r vis -> LoggingFor r attch -> DocInOutFunc (LoggingFor r) mthd bod Source #

ProcProg r vis stmt mthd prg file mod bod block => ProcProg (LoggingFor r) vis stmt mthd prg file mod bod block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

OOProg r vis stmt mthd stvr attch prg file mod bod block => OOProg (LoggingFor r) vis stmt mthd stvr attch prg file mod bod block Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class TypeSym r => TypeElim (r :: Type -> Type) where Source #

Instances

Instances details
TypeElim r => TypeElim (LoggingFor r) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

getTypeString :: UnRepr r TypeData => r TypeData -> String Source #

A helper function for extracting the String representation from an `r TypeData`