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 Value = ValData Source #

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

type NamedArgs (r :: k -> Type) (var :: k) (val :: k) = [(VS (r var), VS (r val))] Source #

type Initializers (r :: k -> Type) (var :: k) (val :: k) = [(VS (r var), VS (r val))] Source #

class (UnRepr r typ, Argument r val, BodySym r bod block, BlockSym r block stmt, CommandLineArgs r val, Literal r val typ, MathConstant r val, VariableValue r var val, VariableSym r var typ, TypeSym r typ, OOTypeSym r typ, OOVariableSym r var val typ, SelfSym r var, BooleanExpression r val, Comparison r val, NumericExpression r val, ValueSym r val typ, InternalValueExp r var val typ, ValueExpression r var val binder typ, OOValueExpression r var val typ, IndexTranslator r val, Array r var val, List r val, ListStatement r stmt val, Reference r val, Set r val, OOFunctionSym r val typ, ParameterSym r param var, ScopeSym r scope, BinderSym r binder typ, InternalList r block var val, MethodSym r mthd vis param bod var typ, OOMethodSym r mthd attch vis param bod var val typ, AttachmentSym r attch, VisibilitySym r vis, StateVarSym r stvr attch vis var val, ClassSym r cls stvr mthd, TypeElim r typ, VariableElim r var typ, EmptyStatement r stmt, MultiStatement r stmt, ValueStatement r stmt val, CommentStatement r stmt, DeclStatement r bod stmt var scope val, OODeclStatement r stmt var scope val, AssignStatement r stmt var val, FuncAppStatement r stmt var val, OOFuncAppStatement r stmt var val, ControlStatement r bod stmt var val, StringStatement r stmt var val, PrintConsole r stmt val, ReadConsole r stmt var, FileHandling r stmt var val, PrintFile r stmt val, ReadFile r stmt var val, ModuleSym r mod cls mthd, FileSym r file mod, ProgramSym r prg file) => OOProg (r :: Type -> Type) prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ Source #

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

Instances

Instances details
OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => OOProg (LoggingFor r) prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ 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 :: k -> Type) (typ :: k) | r -> typ where Source #

Class for representing a type.

Methods

bool :: VS (r typ) Source #

int :: VS (r typ) Source #

float :: VS (r typ) Source #

double :: VS (r typ) Source #

char :: VS (r typ) Source #

string :: VS (r typ) Source #

infile :: VS (r typ) Source #

outfile :: VS (r typ) Source #

referenceType :: VS (r typ) -> VS (r typ) Source #

listType :: VS (r typ) -> VS (r typ) Source #

setType :: VS (r typ) -> VS (r typ) Source #

arrayType :: VS (r typ) -> VS (r typ) Source #

innerType :: VS (r typ) -> VS (r typ) Source #

funcType :: [VS (r typ)] -> VS (r typ) -> VS (r typ) Source #

void :: VS (r typ) Source #

Instances

Instances details
TypeSym r typ => TypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

bool :: VS (LoggingFor r typ) Source #

int :: VS (LoggingFor r typ) Source #

float :: VS (LoggingFor r typ) Source #

double :: VS (LoggingFor r typ) Source #

char :: VS (LoggingFor r typ) Source #

string :: VS (LoggingFor r typ) Source #

infile :: VS (LoggingFor r typ) Source #

outfile :: VS (LoggingFor r typ) Source #

referenceType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

listType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

setType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

arrayType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

innerType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

funcType :: [VS (LoggingFor r typ)] -> VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

void :: VS (LoggingFor r typ) Source #

class OOTypeSym (r :: k -> Type) (typ :: k) | r -> typ where Source #

Methods

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

Instances

Instances details
OOTypeSym r typ => OOTypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class BinderSym (r :: k -> Type) (binder :: k) (typ :: k) | r -> binder typ 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 typ) -> VS (r binder) Source #

Instances

Instances details
BinderSym r binder typ => BinderSym (LoggingFor r :: Type -> Type) (binder :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

binder :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r binder) 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 :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where Source #

Methods

valStmt :: VS (r val) -> MS (r stmt) Source #

Converts a value to statement

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class AssignStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

(&-=) :: VS (r var) -> VS (r val) -> MS (r stmt) infixl 1 Source #

(&+=) :: VS (r var) -> VS (r val) -> MS (r stmt) infixl 1 Source #

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

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

assign :: VS (r var) -> VS (r val) -> MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, AssignStatement r stmt var val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => AssignStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(&-=) :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(&+=) :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(&++) :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

(&--) :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

assign :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(&=) :: forall {k} r (stmt :: k) (var :: k) (val :: k). AssignStatement r stmt var val => VS (r var) -> VS (r val) -> MS (r stmt) infixr 1 Source #

class DeclStatement (r :: k -> Type) (bod :: k) (stmt :: k) (var :: k) (scope :: k) (val :: k) | r -> bod stmt var scope val where Source #

Methods

varDec :: VS (r var) -> r scope -> MS (r stmt) Source #

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

varDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt) Source #

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

listDec :: Integer -> VS (r var) -> r scope -> 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 :: VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt) Source #

setDec :: VS (r var) -> r scope -> MS (r stmt) Source #

setDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt) Source #

arrayDec :: Integer -> VS (r val) -> VS (r var) -> r scope -> 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 :: VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt) Source #

constDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt) Source #

funcDecDef :: VS (r var) -> r scope -> [VS (r var)] -> MS (r bod) -> MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => DeclStatement (LoggingFor r :: Type -> Type) (bod :: Type) (stmt :: Type) (var :: Type) (scope :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

varDec :: VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

varDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listDec :: Integer -> VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

listDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

setDec :: VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

setDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

arrayDec :: Integer -> VS (LoggingFor r val) -> VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

arrayDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

constDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

funcDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r var)] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

class OODeclStatement (r :: k -> Type) (stmt :: k) (var :: k) (scope :: k) (val :: k) | r -> stmt var scope val where Source #

Methods

objDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt) Source #

objDecNew :: VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt) Source #

extObjDecNew :: Library -> VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt) Source #

Instances

Instances details
(DeclStatement (LoggingFor r) bod stmt var scope val, OODeclStatement r stmt var scope val) => OODeclStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (scope :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

objDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

objDecNew :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

extObjDecNew :: Library -> VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

objDecNewNoParams :: forall {k} r (stmt :: k) (var :: k) (scope :: k) (val :: k). OODeclStatement r stmt var scope val => VS (r var) -> r scope -> MS (r stmt) Source #

extObjDecNewNoParams :: forall {k} r (stmt :: k) (var :: k) (scope :: k) (val :: k). OODeclStatement r stmt var scope val => Library -> VS (r var) -> r scope -> MS (r stmt) Source #

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

Methods

print :: VS (r val) -> MS (r stmt) Source #

printLn :: VS (r val) -> MS (r stmt) Source #

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

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

print :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printLn :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

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

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

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

Methods

getInput :: VS (r var) -> MS (r stmt) Source #

discardInput :: MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, FileHandling r stmt var val, PrintFile r stmt val, ReadConsole r stmt var, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => ReadConsole (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

getInput :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardInput :: MS (LoggingFor r stmt) Source #

class FileHandling (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

openFileR :: VS (r var) -> VS (r val) -> MS (r stmt) Source #

openFileW :: VS (r var) -> VS (r val) -> MS (r stmt) Source #

openFileA :: VS (r var) -> VS (r val) -> MS (r stmt) Source #

closeFile :: VS (r val) -> MS (r stmt) Source #

Instances

Instances details
FileHandling r stmt var val => FileHandling (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

openFileR :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

openFileW :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

openFileA :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

closeFile :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

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

Methods

printFile :: VS (r val) -> VS (r val) -> MS (r stmt) Source #

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

printFileLn :: VS (r val) -> VS (r val) -> MS (r stmt) Source #

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

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

printFile :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printFileLn :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printFileStr :: VS (LoggingFor r val) -> String -> MS (LoggingFor r stmt) Source #

printFileStrLn :: VS (LoggingFor r val) -> String -> MS (LoggingFor r stmt) Source #

class ReadFile (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

getFileInput :: VS (r val) -> VS (r var) -> MS (r stmt) Source #

discardFileInput :: VS (r val) -> MS (r stmt) Source #

getFileInputLine :: VS (r val) -> VS (r var) -> MS (r stmt) Source #

discardFileLine :: VS (r val) -> MS (r stmt) Source #

getFileInputAll :: VS (r val) -> VS (r var) -> MS (r stmt) Source #

Instances

Instances details
(MultiStatement r stmt, FileHandling r stmt var val, PrintFile r stmt val, ReadFile r stmt var val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => ReadFile (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

getFileInput :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardFileInput :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

getFileInputLine :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardFileLine :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

getFileInputAll :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

class StringStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

stringSplit :: Char -> VS (r var) -> VS (r val) -> 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 :: [VS (r var)] -> VS (r val) -> MS (r stmt) Source #

stringListLists :: [VS (r var)] -> VS (r val) -> 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

Instances

Instances details
(MultiStatement r stmt, StringStatement r stmt var val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => StringStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

stringSplit :: Char -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

stringListVals :: [VS (LoggingFor r var)] -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

stringListLists :: [VS (LoggingFor r var)] -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

class FuncAppStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

inOutCall :: InOutCall r stmt var val Source #

extInOutCall :: Library -> InOutCall r stmt var val Source #

Instances

Instances details
FuncAppStatement r stmt var val => FuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) stmt var val Source #

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

class OOFuncAppStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where Source #

Methods

selfInOutCall :: InOutCall r stmt var val Source #

Instances

Instances details
OOFuncAppStatement r stmt var val => OOFuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

selfInOutCall :: InOutCall (LoggingFor r) stmt var val 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 :: forall {k} r (typ :: k) (var :: k) (bod :: k) (stmt :: k) (scope :: k) (val :: k). (TypeSym r typ, VariableSym r var typ, DeclStatement r bod stmt var scope val) => VS (r typ) -> [VS (r val)] -> r scope -> MS (r stmt) Source #

addObserver :: forall {k} r (typ :: k) (var :: k) (val :: k) (stmt :: k). (TypeSym r typ, VariableSym r var typ, VariableValue r var val, ValueSym r val typ, List r val, ListStatement r stmt val) => VS (r val) -> MS (r stmt) Source #

class ControlStatement (r :: k -> Type) (bod :: k) (stmt :: k) (var :: k) (val :: k) | r -> bod stmt var val where Source #

Methods

break :: MS (r stmt) Source #

continue :: MS (r stmt) Source #

returnStmt :: VS (r val) -> MS (r stmt) Source #

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

ifCond :: [(VS (r val), 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 :: VS (r val) -> [(VS (r val), MS (r bod))] -> MS (r bod) -> MS (r stmt) Source #

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

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

forRange :: VS (r var) -> VS (r val) -> VS (r val) -> VS (r val) -> MS (r bod) -> MS (r stmt) Source #

forEach :: VS (r var) -> VS (r val) -> MS (r bod) -> MS (r stmt) Source #

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

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

assert :: VS (r val) -> VS (r val) -> MS (r stmt) Source #

Instances

Instances details
ControlStatement r bod stmt var val => ControlStatement (LoggingFor r :: Type -> Type) (bod :: Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

break :: MS (LoggingFor r stmt) Source #

continue :: MS (LoggingFor r stmt) Source #

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

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

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

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

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

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

forRange :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forEach :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

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

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

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

ifNoElse :: forall {k} r (bod :: k) (block :: k) (stmt :: k) (var :: k) (val :: k). (BodySym r bod block, ControlStatement r bod stmt var val) => [(VS (r val), MS (r bod))] -> MS (r stmt) Source #

switchAsIf :: forall {k} r (bod :: k) (stmt :: k) (var :: k) (val :: k). (ControlStatement r bod stmt var val, Comparison r val) => VS (r val) -> [(VS (r val), MS (r bod))] -> MS (r bod) -> MS (r stmt) Source #

class VariableSym (r :: k -> Type) (var :: k) (typ :: k) | r -> var typ where Source #

Class for representing variables.

Methods

var :: Label -> VS (r typ) -> VS (r var) Source #

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

constant :: Label -> VS (r typ) -> VS (r var) Source #

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

extVar :: Library -> Label -> VS (r typ) -> VS (r var) 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

Instances

Instances details
VariableSym r var typ => VariableSym (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

var :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

constant :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

extVar :: Library -> Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

class ScopeSym (r :: k -> Type) (scope :: k) | r -> scope 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.

Methods

global :: r scope Source #

mainFn :: r scope Source #

local :: r scope Source #

Instances

Instances details
ScopeSym r scope => ScopeSym (LoggingFor r :: Type -> Type) (scope :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

global :: LoggingFor r scope Source #

mainFn :: LoggingFor r scope Source #

local :: LoggingFor r scope Source #

class OOVariableSym (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ where Source #

Methods

classVar :: Label -> VS (r typ) -> VS (r var) Source #

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

classConst :: Label -> VS (r typ) -> VS (r var) Source #

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

classVarAccess :: VS (r typ) -> VS (r var) -> VS (r var) Source #

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

extClassVarAccess :: VS (r typ) -> VS (r var) -> VS (r var) Source #

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

instanceVarAccess :: VS (r val) -> VS (r var) -> VS (r var) Source #

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

Instances

Instances details
OOVariableSym r var val typ => OOVariableSym (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

classVar :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

classConst :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

classVarAccess :: VS (LoggingFor r typ) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

extClassVarAccess :: VS (LoggingFor r typ) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

instanceVarAccess :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

class SelfSym (r :: k -> Type) (var :: k) | r -> var where Source #

Methods

self :: VS (r var) Source #

self keyword

Instances

Instances details
SelfSym r var => SelfSym (LoggingFor r :: Type -> Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

self :: VS (LoggingFor r var) Source #

instanceVarSelf :: forall {k} r (var :: k) (val :: k) (typ :: k). (OOVariableSym r var val typ, SelfSym r var, VariableValue r var val) => VS (r var) -> VS (r var) Source #

Given a variable v, creates `self.v`

class VariableElim (r :: k -> Type) (var :: k) (typ :: k) | r -> var typ where Source #

Methods

variableName :: r var -> String Source #

variableType :: r var -> r typ Source #

Instances

Instances details
VariableElim r var typ => VariableElim (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

($->) :: forall {k} r (var :: k) (val :: k) (typ :: k). OOVariableSym r var val typ => VS (r val) -> VS (r var) -> VS (r var) infixl 9 Source #

listOf :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => Label -> VS (r typ) -> VS (r var) Source #

listVar :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => Label -> VS (r typ) -> VS (r var) Source #

class ValueSym (r :: k -> Type) (val :: k) (typ :: k) | r -> val typ where Source #

Class for representing a value.

Methods

valueType :: r val -> r typ Source #

Instances

Instances details
ValueSym r val typ => ValueSym (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valueType :: LoggingFor r val -> LoggingFor r typ Source #

class Argument (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

pointerArg :: VS (r val) -> VS (r val) Source #

Instances

Instances details
Argument r val => Argument (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pointerArg :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class Literal (r :: k -> Type) (val :: k) (typ :: k) | r -> val typ where Source #

Methods

litTrue :: VS (r val) Source #

litFalse :: VS (r val) Source #

litChar :: Char -> VS (r val) Source #

litDouble :: Double -> VS (r val) Source #

litFloat :: Float -> VS (r val) Source #

litInt :: Integer -> VS (r val) Source #

litString :: String -> VS (r val) Source #

litArray :: VS (r typ) -> [VS (r val)] -> VS (r val) Source #

litList :: VS (r typ) -> [VS (r val)] -> VS (r val) Source #

litSet :: VS (r typ) -> [VS (r val)] -> VS (r val) Source #

Instances

Instances details
Literal r val typ => Literal (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

litTrue :: VS (LoggingFor r val) Source #

litFalse :: VS (LoggingFor r val) Source #

litChar :: Char -> VS (LoggingFor r val) Source #

litDouble :: Double -> VS (LoggingFor r val) Source #

litFloat :: Float -> VS (LoggingFor r val) Source #

litInt :: Integer -> VS (LoggingFor r val) Source #

litString :: String -> VS (LoggingFor r val) Source #

litArray :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

litList :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

litSet :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

class MathConstant (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

pi :: VS (r val) Source #

Instances

Instances details
MathConstant r val => MathConstant (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: VS (LoggingFor r val) Source #

class VariableValue (r :: k -> Type) (var :: k) (val :: k) | r -> var val where Source #

Methods

valueOf :: VS (r var) -> VS (r val) Source #

Instances

Instances details
VariableValue r var val => VariableValue (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valueOf :: VS (LoggingFor r var) -> VS (LoggingFor r val) Source #

class CommandLineArgs (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

arg :: Integer -> VS (r val) Source #

argsList :: VS (r val) Source #

argExists :: Integer -> VS (r val) Source #

Instances

Instances details
CommandLineArgs r val => CommandLineArgs (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class NumericExpression (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

(#~) :: VS (r val) -> VS (r val) infixl 8 Source #

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

(#|) :: VS (r val) -> VS (r val) infixl 7 Source #

(#+) :: VS (r val) -> VS (r val) -> VS (r val) infixl 5 Source #

(#-) :: VS (r val) -> VS (r val) -> VS (r val) infixl 5 Source #

(#*) :: VS (r val) -> VS (r val) -> VS (r val) infixl 6 Source #

(#/) :: VS (r val) -> VS (r val) -> VS (r val) infixl 6 Source #

(#%) :: VS (r val) -> VS (r val) -> VS (r val) infixl 6 Source #

(#^) :: VS (r val) -> VS (r val) -> VS (r val) infixl 7 Source #

log :: VS (r val) -> VS (r val) Source #

ln :: VS (r val) -> VS (r val) Source #

exp :: VS (r val) -> VS (r val) Source #

sin :: VS (r val) -> VS (r val) Source #

cos :: VS (r val) -> VS (r val) Source #

tan :: VS (r val) -> VS (r val) Source #

csc :: VS (r val) -> VS (r val) Source #

sec :: VS (r val) -> VS (r val) Source #

cot :: VS (r val) -> VS (r val) Source #

arcsin :: VS (r val) -> VS (r val) Source #

arccos :: VS (r val) -> VS (r val) Source #

arctan :: VS (r val) -> VS (r val) Source #

floor :: VS (r val) -> VS (r val) Source #

ceil :: VS (r val) -> VS (r val) Source #

Instances

Instances details
NumericExpression r val => NumericExpression (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(#~) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#/^) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#|) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#+) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#-) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#*) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#/) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#%) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#^) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

log :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

ln :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

exp :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

sin :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

cos :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

tan :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

csc :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

sec :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

cot :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arcsin :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arccos :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arctan :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

floor :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

ceil :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class BooleanExpression (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

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

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

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

Instances

Instances details
BooleanExpression r val => BooleanExpression (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(?!) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?&&) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?||) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class Comparison (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

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

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

(?>) :: VS (r val) -> VS (r val) -> VS (r val) infixl 4 Source #

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

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

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

Instances

Instances details
Comparison r val => Comparison (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(?<) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?<=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?>) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?>=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?==) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?!=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class ValueExpression (r :: k -> Type) (var :: k) (val :: k) (binder :: k) (typ :: k) | r -> var val binder typ where Source #

A class for representing values that can include expressions

Methods

inlineIf :: VS (r val) -> VS (r val) -> VS (r val) -> VS (r val) Source #

funcAppMixedArgs :: MixedCall r var val typ Source #

extFuncAppMixedArgs :: Library -> MixedCall r var val typ Source #

libFuncAppMixedArgs :: Library -> MixedCall r var val typ Source #

lambda :: [VS (r binder)] -> VS (r val) -> VS (r val) Source #

notNull :: VS (r val) -> VS (r val) Source #

Instances

Instances details
ValueExpression r var val binder typ => ValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (binder :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inlineIf :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

funcAppMixedArgs :: MixedCall (LoggingFor r) var val typ Source #

extFuncAppMixedArgs :: Library -> MixedCall (LoggingFor r) var val typ Source #

libFuncAppMixedArgs :: Library -> MixedCall (LoggingFor r) var val typ Source #

lambda :: [VS (LoggingFor r binder)] -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

notNull :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class InternalValueExp (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ Source #

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

Minimal complete definition

objMethodCallMixedArgs', classMethodCallMixedArgs'

Instances

Instances details
InternalValueExp r var val typ => InternalValueExp (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

objMethodCallMixedArgs' :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r val) -> [VS (LoggingFor r val)] -> NamedArgs (LoggingFor r) var val -> VS (LoggingFor r val)

classMethodCallMixedArgs' :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> NamedArgs (LoggingFor r) var val -> VS (LoggingFor r val)

class OOValueExpression (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ where Source #

Methods

newObjMixedArgs :: MixedCtorCall r var val typ Source #

extNewObjMixedArgs :: Library -> MixedCtorCall r var val typ Source #

libNewObjMixedArgs :: Library -> MixedCtorCall r var val typ Source #

Instances

Instances details
OOValueExpression r var val typ => OOValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

newObjMixedArgs :: MixedCtorCall (LoggingFor r) var val typ Source #

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

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

funcApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => PosCall r val typ Source #

funcAppNamedArgs :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => Label -> VS (r typ) -> NamedArgs r var val -> VS (r val) Source #

selfMethodCall :: forall {k} r (var :: k) (val :: k) (typ :: k). (InternalValueExp r var val typ, VariableValue r var val, SelfSym r var) => PosCall r val typ Source #

extFuncApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => Library -> PosCall r val typ Source #

libFuncApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => Library -> PosCall r val typ Source #

newObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => PosCtorCall r val typ Source #

extNewObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => Library -> PosCtorCall r val typ Source #

libNewObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => Library -> PosCtorCall r val typ Source #

exists :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => VS (r val) -> VS (r val) Source #

objMethodCall :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r val) -> Label -> [VS (r val)] -> VS (r val) 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 :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r val) -> Label -> NamedArgs r var val -> VS (r val) Source #

Calling a method with named arguments.

objMethodCallMixedArgs :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r val) -> Label -> [VS (r val)] -> NamedArgs r var val -> VS (r val) Source #

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

objMethodCallNoParams :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r val) -> Label -> VS (r val) Source #

Calling a method with no parameters.

classMethodCall :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r typ) -> Label -> [VS (r val)] -> VS (r val) 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 :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r typ) -> Label -> NamedArgs r var val -> VS (r val) Source #

Calling a class method with named arguments.

classMethodCallMixedArgs :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r typ) -> Label -> [VS (r val)] -> NamedArgs r var val -> VS (r val) Source #

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

classMethodCallNoParams :: forall {k} r (var :: k) (val :: k) (typ :: k). InternalValueExp r var val typ => VS (r typ) -> VS (r typ) -> Label -> VS (r val) Source #

Calling a class method with no parameters.

class OOFunctionSym (r :: Type -> Type) val typ | r -> val typ where Source #

Methods

func :: Label -> VS (r typ) -> [VS (r val)] -> VS (r FuncData) Source #

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

func :: Label -> VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r FuncData) Source #

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

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

selfAccess :: (VariableValue r var val, SelfSym r var, OOFunctionSym r val typ) => VS (r FuncData) -> VS (r val) Source #

class GetSet (r :: k -> Type) (var :: k) (val :: k) | r -> var val where Source #

Methods

get :: VS (r val) -> VS (r var) -> VS (r val) Source #

set :: VS (r val) -> VS (r var) -> VS (r val) -> VS (r val) Source #

Instances

Instances details
GetSet r var val => GetSet (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

get :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r val) Source #

set :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class Reference (r :: k -> Type) (val :: k) | r -> val where Source #

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

Methods

makeRef :: VS (r val) -> VS (r val) Source #

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

maybeDeref :: VS (r val) -> VS (r val) Source #

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

Instances

Instances details
Reference r val => Reference (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

makeRef :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

maybeDeref :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class Array (r :: k -> Type) (var :: k) (val :: k) | r -> var val where Source #

Methods

arrayElem :: VS (r val) -> VS (r val) -> VS (r var) Source #

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

arrayLength :: VS (r val) -> VS (r val) Source #

Given an array, return its length

arrayCopy :: VS (r val) -> VS (r val) Source #

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

Instances

Instances details
Array r var val => Array (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

arrayElem :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r var) Source #

arrayLength :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arrayCopy :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

class List (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

listSize :: VS (r val) -> VS (r val) Source #

Finds the size of a list. Arguments are: List

listAccess :: VS (r val) -> VS (r val) -> VS (r val) Source #

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

indexOf :: VS (r val) -> VS (r val) -> VS (r val) Source #

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

Instances

Instances details
List r val => List (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listSize :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

listAccess :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

indexOf :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

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

Methods

listAdd :: VS (r val) -> VS (r val) -> VS (r val) -> MS (r stmt) Source #

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

listAppend :: VS (r val) -> VS (r val) -> MS (r stmt) Source #

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

listSet :: VS (r val) -> VS (r val) -> VS (r val) -> MS (r stmt) Source #

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listAdd :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listAppend :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listSet :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

class InternalList (r :: k -> Type) (block :: k) (var :: k) (val :: k) | r -> block var val Source #

Minimal complete definition

listSlice'

Instances

Instances details
InternalList r block var val => InternalList (LoggingFor r :: Type -> Type) (block :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listSlice' :: Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r val)) -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r block)

listSlice :: forall {k} r (block :: k) (var :: k) (val :: k). InternalList r block var val => VS (r var) -> VS (r val) -> Maybe (VS (r val)) -> Maybe (VS (r val)) -> Maybe (VS (r val)) -> 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 Set (r :: k -> Type) (val :: k) | r -> val where Source #

Methods

contains :: VS (r val) -> VS (r val) -> VS (r val) Source #

Checks membership Arguments are: Set, val

setAdd :: VS (r val) -> VS (r val) -> VS (r val) Source #

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

setRemove :: VS (r val) -> VS (r val) -> VS (r val) Source #

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

setUnion :: VS (r val) -> VS (r val) -> VS (r val) Source #

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

Instances

Instances details
Set r val => Set (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

contains :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setAdd :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setRemove :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setUnion :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

listIndexExists :: forall {k} r (val :: k). (List r val, Comparison r val) => VS (r val) -> VS (r val) -> VS (r val) Source #

at :: forall {k} r (val :: k). List r val => VS (r val) -> VS (r val) -> VS (r val) Source #

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

Methods

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class StrategyPattern (r :: k -> Type) (bod :: k) (block :: k) (var :: k) (val :: k) | r -> bod block var val where Source #

Methods

runStrategy :: Label -> [(Label, MS (r bod))] -> Maybe (VS (r val)) -> Maybe (VS (r var)) -> MS (r block) Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

runStrategy :: Label -> [(Label, MS (LoggingFor r bod))] -> Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r var)) -> 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 ParameterSym (r :: k -> Type) (param :: k) (var :: k) | r -> param var where Source #

A class for representing function/method parameters.

Methods

param :: VS (r var) -> MS (r param) Source #

pointerParam :: VS (r var) -> MS (r param) 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.

Instances

Instances details
ParameterSym r param var => ParameterSym (LoggingFor r :: Type -> Type) (param :: Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

param :: VS (LoggingFor r var) -> MS (LoggingFor r param) Source #

pointerParam :: VS (LoggingFor r var) -> MS (LoggingFor r param) Source #

class MethodSym (r :: k -> Type) (mthd :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (typ :: k) | r -> mthd vis param bod var typ 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 typ) -> [MS (r param)] -> 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 var Source #

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

Instances

Instances details
MethodSym r mthd vis param bod var typ => MethodSym (LoggingFor r :: Type -> Type) (mthd :: Type) (vis :: Type) (param :: Type) (bod :: Type) (var :: Type) (typ :: Type) 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 typ) -> [MS (LoggingFor r param)] -> 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 var Source #

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

class OOMethodSym (r :: k -> Type) (mthd :: k) (attch :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (val :: k) (typ :: k) | r -> mthd attch vis param bod var val typ where Source #

Methods

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

getMethod :: VS (r var) -> MS (r mthd) Source #

setMethod :: VS (r var) -> MS (r mthd) Source #

constructor :: [MS (r param)] -> Initializers r var val -> MS (r bod) -> MS (r mthd) Source #

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

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

Instances

Instances details
OOMethodSym r mthd attch vis param bod var val typ => OOMethodSym (LoggingFor r :: Type -> Type) (mthd :: Type) (attch :: Type) (vis :: Type) (param :: Type) (bod :: Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

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

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

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

privMethod :: forall {k} r (mthd :: k) (attch :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (val :: k) (typ :: k). (OOMethodSym r mthd attch vis param bod var val typ, AttachmentSym r attch, VisibilitySym r vis) => Label -> VS (r typ) -> [MS (r param)] -> MS (r bod) -> MS (r mthd) Source #

pubMethod :: forall {k} r (mthd :: k) (attch :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (val :: k) (typ :: k). (OOMethodSym r mthd attch vis param bod var val typ, AttachmentSym r attch, VisibilitySym r vis) => Label -> VS (r typ) -> [MS (r param)] -> MS (r bod) -> MS (r mthd) Source #

initializer :: forall {k} r (mthd :: k) (attch :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (val :: k) (typ :: k) (block :: k). (OOMethodSym r mthd attch vis param bod var val typ, BodySym r bod block) => [MS (r param)] -> Initializers r var val -> MS (r mthd) Source #

nonInitConstructor :: forall {k} r (mthd :: k) (attch :: k) (vis :: k) (param :: k) (bod :: k) (var :: k) (val :: k) (typ :: k). OOMethodSym r mthd attch vis param bod var val typ => [MS (r param)] -> MS (r bod) -> MS (r mthd) Source #

class StateVarSym (r :: k -> Type) (stvr :: k) (attch :: k) (vis :: k) (var :: k) (val :: k) | r -> stvr attch vis var val 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 -> VS (r var) -> 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 -> VS (r var) -> VS (r val) -> 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 -> VS (r var) -> VS (r val) -> 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 stvr attch vis var val => StateVarSym (LoggingFor r :: Type -> Type) (stvr :: Type) (attch :: Type) (vis :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

stateVar :: LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r var) -> CSStateVar (LoggingFor r) stvr Source #

stateVarDef :: LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> CSStateVar (LoggingFor r) stvr Source #

constVar :: LoggingFor r vis -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> CSStateVar (LoggingFor r) stvr Source #

privDVar :: forall {k} r (attch :: k) (vis :: k) (stvr :: k) (var :: k) (val :: k). (AttachmentSym r attch, VisibilitySym r vis, StateVarSym r stvr attch vis var val) => VS (r var) -> CSStateVar r stvr Source #

pubDVar :: forall {k} r (attch :: k) (vis :: k) (stvr :: k) (var :: k) (val :: k). (AttachmentSym r attch, VisibilitySym r vis, StateVarSym r stvr attch vis var val) => VS (r var) -> CSStateVar r stvr Source #

pubSVar :: forall {k} r (attch :: k) (vis :: k) (stvr :: k) (var :: k) (val :: k). (AttachmentSym r attch, VisibilitySym r vis, StateVarSym r stvr attch vis var val) => VS (r var) -> CSStateVar r stvr Source #

class ClassSym (r :: k -> Type) (cls :: k) (stvr :: k) (mthd :: k) | r -> cls stvr mthd where Source #

Class for representing an OO class.

Methods

buildClass :: Maybe Label -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r cls) 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 cls) 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 cls) Source #

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

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

Instances

Instances details
ClassSym r cls stvr mthd => ClassSym (LoggingFor r :: Type -> Type) (cls :: Type) (stvr :: Type) (mthd :: Type) 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 cls) Source #

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

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

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

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

Class for representing a module.

Methods

buildModule :: Label -> [Label] -> [MS (r mthd)] -> [CS (r cls)] -> 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 cls mthd => ModuleSym (LoggingFor r :: Type -> Type) (mod :: Type) (cls :: Type) (mthd :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

convType :: forall {k} r (typ :: k). TypeSym r typ => CodeType -> VS (r typ) Source #

convTypeOO :: forall {k} r (typ :: k). (TypeSym r typ, OOTypeSym r typ) => CodeType -> VS (r typ) 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

OOTypeSym r typ => OOTypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

SelfSym r var => SelfSym (LoggingFor r :: Type -> Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

self :: VS (LoggingFor r var) Source #

Argument r val => Argument (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pointerArg :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

BooleanExpression r val => BooleanExpression (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(?!) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?&&) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?||) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

CommandLineArgs r val => CommandLineArgs (LoggingFor r :: Type -> Type) (val :: 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 #

Comparison r val => Comparison (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(?<) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?<=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?>) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?>=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?==) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(?!=) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) 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 #

List r val => List (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listSize :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

listAccess :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

indexOf :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

MathConstant r val => MathConstant (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: VS (LoggingFor r val) 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 #

NumericExpression r val => NumericExpression (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(#~) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#/^) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#|) :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#+) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#-) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#*) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#/) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#%) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

(#^) :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

log :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

ln :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

exp :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

sin :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

cos :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

tan :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

csc :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

sec :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

cot :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arcsin :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arccos :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arctan :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

floor :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

ceil :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

Reference r val => Reference (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

makeRef :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

maybeDeref :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

ScopeSym r scope => ScopeSym (LoggingFor r :: Type -> Type) (scope :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

global :: LoggingFor r scope Source #

mainFn :: LoggingFor r scope Source #

local :: LoggingFor r scope Source #

Set r val => Set (LoggingFor r :: Type -> Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

contains :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setAdd :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setRemove :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

setUnion :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

TypeElim r typ => TypeElim (LoggingFor r :: Type -> Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

TypeSym r typ => TypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

bool :: VS (LoggingFor r typ) Source #

int :: VS (LoggingFor r typ) Source #

float :: VS (LoggingFor r typ) Source #

double :: VS (LoggingFor r typ) Source #

char :: VS (LoggingFor r typ) Source #

string :: VS (LoggingFor r typ) Source #

infile :: VS (LoggingFor r typ) Source #

outfile :: VS (LoggingFor r typ) Source #

referenceType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

listType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

setType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

arrayType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

innerType :: VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

funcType :: [VS (LoggingFor r typ)] -> VS (LoggingFor r typ) -> VS (LoggingFor r typ) Source #

void :: VS (LoggingFor r typ) 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 #

GetSet r var val => GetSet (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

get :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r val) Source #

set :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> VS (LoggingFor r val) 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 #

Array r var val => Array (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

arrayElem :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r var) Source #

arrayLength :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

arrayCopy :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

BinderSym r binder typ => BinderSym (LoggingFor r :: Type -> Type) (binder :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

binder :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r binder) 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 #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listAdd :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listAppend :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listSet :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

Literal r val typ => Literal (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

litTrue :: VS (LoggingFor r val) Source #

litFalse :: VS (LoggingFor r val) Source #

litChar :: Char -> VS (LoggingFor r val) Source #

litDouble :: Double -> VS (LoggingFor r val) Source #

litFloat :: Float -> VS (LoggingFor r val) Source #

litInt :: Integer -> VS (LoggingFor r val) Source #

litString :: String -> VS (LoggingFor r val) Source #

litArray :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

litList :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

litSet :: VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r val) Source #

NativeVector lang val typ => NativeVector (LoggingFor lang :: Type -> Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

vecType :: VS (LoggingFor lang typ) -> VS (LoggingFor lang typ) Source #

litVec :: VS (LoggingFor lang typ) -> [VS (LoggingFor lang val)] -> VS (LoggingFor lang val) Source #

vecScale :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

vecAdd :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

vecIndex :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

vecDot :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

vecMag :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

vecUnit :: VS (LoggingFor lang val) -> VS (LoggingFor lang val) Source #

ParameterSym r param var => ParameterSym (LoggingFor r :: Type -> Type) (param :: Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

param :: VS (LoggingFor r var) -> MS (LoggingFor r param) Source #

pointerParam :: VS (LoggingFor r var) -> MS (LoggingFor r param) Source #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

print :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printLn :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

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

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

printFile :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printFileLn :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

printFileStr :: VS (LoggingFor r val) -> String -> MS (LoggingFor r stmt) Source #

printFileStrLn :: VS (LoggingFor r val) -> String -> MS (LoggingFor r stmt) Source #

(MultiStatement r stmt, FileHandling r stmt var val, PrintFile r stmt val, ReadConsole r stmt var, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => ReadConsole (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

getInput :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardInput :: MS (LoggingFor r stmt) Source #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

ValueSym r val typ => ValueSym (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valueType :: LoggingFor r val -> LoggingFor r typ Source #

VariableElim r var typ => VariableElim (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

VariableSym r var typ => VariableSym (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

var :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

constant :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

extVar :: Library -> Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

VariableValue r var val => VariableValue (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

valueOf :: VS (LoggingFor r var) -> VS (LoggingFor r val) Source #

ClassSym r cls stvr mthd => ClassSym (LoggingFor r :: Type -> Type) (cls :: Type) (stvr :: Type) (mthd :: Type) 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 cls) Source #

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

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

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

InternalValueExp r var val typ => InternalValueExp (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

objMethodCallMixedArgs' :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r val) -> [VS (LoggingFor r val)] -> NamedArgs (LoggingFor r) var val -> VS (LoggingFor r val)

classMethodCallMixedArgs' :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> NamedArgs (LoggingFor r) var val -> VS (LoggingFor r val)

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

OOFuncAppStatement r stmt var val => OOFuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

selfInOutCall :: InOutCall (LoggingFor r) stmt var val Source #

OOValueExpression r var val typ => OOValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

newObjMixedArgs :: MixedCtorCall (LoggingFor r) var val typ Source #

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

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

OOVariableSym r var val typ => OOVariableSym (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

classVar :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

classConst :: Label -> VS (LoggingFor r typ) -> VS (LoggingFor r var) Source #

classVarAccess :: VS (LoggingFor r typ) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

extClassVarAccess :: VS (LoggingFor r typ) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

instanceVarAccess :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> VS (LoggingFor r var) Source #

(MultiStatement r stmt, AssignStatement r stmt var val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => AssignStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

(&-=) :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(&+=) :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(&++) :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

(&--) :: VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

assign :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

FileHandling r stmt var val => FileHandling (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

openFileR :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

openFileW :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

openFileA :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

closeFile :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

FuncAppStatement r stmt var val => FuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) stmt var val Source #

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

InternalList r block var val => InternalList (LoggingFor r :: Type -> Type) (block :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

listSlice' :: Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r val)) -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r block)

(MultiStatement r stmt, FileHandling r stmt var val, PrintFile r stmt val, ReadFile r stmt var val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => ReadFile (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

getFileInput :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardFileInput :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

getFileInputLine :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

discardFileLine :: VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

getFileInputAll :: VS (LoggingFor r val) -> VS (LoggingFor r var) -> MS (LoggingFor r stmt) Source #

(MultiStatement r stmt, StringStatement r stmt var val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => StringStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

stringSplit :: Char -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

stringListVals :: [VS (LoggingFor r var)] -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

stringListLists :: [VS (LoggingFor r var)] -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

(DeclStatement (LoggingFor r) bod stmt var scope val, OODeclStatement r stmt var scope val) => OODeclStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (scope :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

objDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

objDecNew :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

extObjDecNew :: Library -> VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

StrategyPattern r bod block var val => StrategyPattern (LoggingFor r :: Type -> Type) (bod :: Type) (block :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

runStrategy :: Label -> [(Label, MS (LoggingFor r bod))] -> Maybe (VS (LoggingFor r val)) -> Maybe (VS (LoggingFor r var)) -> MS (LoggingFor r block) Source #

ControlStatement r bod stmt var val => ControlStatement (LoggingFor r :: Type -> Type) (bod :: Type) (stmt :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

break :: MS (LoggingFor r stmt) Source #

continue :: MS (LoggingFor r stmt) Source #

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

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

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

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

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

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

forRange :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

forEach :: VS (LoggingFor r var) -> VS (LoggingFor r val) -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

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

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

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

ValueExpression r var val binder typ => ValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (binder :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inlineIf :: VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

funcAppMixedArgs :: MixedCall (LoggingFor r) var val typ Source #

extFuncAppMixedArgs :: Library -> MixedCall (LoggingFor r) var val typ Source #

libFuncAppMixedArgs :: Library -> MixedCall (LoggingFor r) var val typ Source #

lambda :: [VS (LoggingFor r binder)] -> VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

notNull :: VS (LoggingFor r val) -> VS (LoggingFor r val) Source #

StateVarSym r stvr attch vis var val => StateVarSym (LoggingFor r :: Type -> Type) (stvr :: Type) (attch :: Type) (vis :: Type) (var :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

stateVar :: LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r var) -> CSStateVar (LoggingFor r) stvr Source #

stateVarDef :: LoggingFor r vis -> LoggingFor r attch -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> CSStateVar (LoggingFor r) stvr Source #

constVar :: LoggingFor r vis -> VS (LoggingFor r var) -> VS (LoggingFor r val) -> CSStateVar (LoggingFor r) stvr Source #

(MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, TypeSym r typ, VariableSym r var typ, VariableValue r var val, VariableElim r var typ, Literal r val typ) => DeclStatement (LoggingFor r :: Type -> Type) (bod :: Type) (stmt :: Type) (var :: Type) (scope :: Type) (val :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

varDec :: VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

varDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

listDec :: Integer -> VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

listDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

setDec :: VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

setDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

arrayDec :: Integer -> VS (LoggingFor r val) -> VS (LoggingFor r var) -> LoggingFor r scope -> MS (LoggingFor r stmt) Source #

arrayDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r val)] -> MS (LoggingFor r stmt) Source #

constDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> VS (LoggingFor r val) -> MS (LoggingFor r stmt) Source #

funcDecDef :: VS (LoggingFor r var) -> LoggingFor r scope -> [VS (LoggingFor r var)] -> MS (LoggingFor r bod) -> MS (LoggingFor r stmt) Source #

MethodSym r mthd vis param bod var typ => MethodSym (LoggingFor r :: Type -> Type) (mthd :: Type) (vis :: Type) (param :: Type) (bod :: Type) (var :: Type) (typ :: Type) 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 typ) -> [MS (LoggingFor r param)] -> 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 var Source #

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

OOMethodSym r mthd attch vis param bod var val typ => OOMethodSym (LoggingFor r :: Type -> Type) (mthd :: Type) (attch :: Type) (vis :: Type) (param :: Type) (bod :: Type) (var :: Type) (val :: Type) (typ :: Type) Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

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

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

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

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 #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

func :: Label -> VS (LoggingFor r typ) -> [VS (LoggingFor r val)] -> VS (LoggingFor r FuncData) Source #

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

ProcProg r prg file mod mthd vis param bod block stmt var scope val binder typ => ProcProg (LoggingFor r) prg file mod mthd vis param bod block stmt var scope val binder typ Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

OOProg r prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => OOProg (LoggingFor r) prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class TypeElim (r :: k -> Type) (typ :: k) | r -> typ where Source #

Methods

getCodeType :: r typ -> CodeType Source #

Instances

Instances details
TypeElim r typ => TypeElim (LoggingFor r :: Type -> Type) (typ :: Type) 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 typ`