drasil-gool-0.1.1.0: A framework for code and document generation for scientific software - GOOL SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.GProc

Description

re-export smart constructors for external code writing

Synopsis

Documentation

type GSProgram a prg = GS (a prg) Source #

type Body = Doc Source #

type Block = Doc Source #

type FS = State FileState Source #

type MS = State MethodState Source #

type VS = State ValueState Source #

type SVariable a = VS (a Variable) Source #

type SValue a = VS (a Value) Source #

type NamedArgs r = [(SVariable r, SValue r)] Source #

class (UnRepr r TypeData, SharedStatement r smt, FunctionSym r, InternalList r, VariableValue r, IndexTranslator r, TypeElim r, VariableElim r, MethodSym r vis smt md, ScopeSym r, BinderSym r) => SharedProg r vis smt md Source #

Instances

Instances details
SharedProg r vis smt md => SharedProg (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class (SharedProg r vis smt md, ProgramSym r vis smt md prg) => ProcProg r vis smt md prg Source #

Instances

Instances details
ProcProg r vis smt md prg => ProcProg (LoggingFor r) vis smt md prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class FileSym r vis smt md => ProgramSym r vis smt md prg | r -> prg where Source #

Methods

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

Instances

Instances details
ProgramSym r vis smt md prg => ProgramSym (LoggingFor r) vis smt md prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class ModuleSym r vis smt md => FileSym r vis smt md where Source #

Methods

fileDoc :: FS (r Module) -> FS (r File) Source #

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

Instances

Instances details
FileSym r vis smt md => FileSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class BlockSym r smt => BodySym r smt where Source #

Methods

body :: [MS (r Block)] -> MS (r Body) Source #

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

Instances

Instances details
BodySym r smt => BodySym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

bodyStatements :: BodySym r smt => [MS (r smt)] -> MS (r Body) Source #

oneLiner :: BodySym r smt => MS (r smt) -> MS (r Body) Source #

class StatementSym r smt => BlockSym r smt where Source #

Methods

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

Instances

Instances details
BlockSym r smt => BlockSym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class TypeSym r where Source #

class TypeSym r => BinderSym r where Source #

Methods

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class ValueSym r => StatementSym r smt | r -> smt where Source #

Methods

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

emptyStmt :: MS (r smt) Source #

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

Instances

Instances details
StatementSym r smt => StatementSym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

emptyStmt :: MS (LoggingFor r smt) Source #

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

class (VariableSym r, StatementSym r smt) => AssignStatement r smt where Source #

Methods

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

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

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

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

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

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

class (VariableSym r, StatementSym r smt, ScopeSym r) => DeclStatement r smt where Source #

Methods

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

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

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

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

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

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

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

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

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

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

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

funcDecDef :: SVariable r -> r ScopeData -> [SVariable r] -> MS (r Body) -> MS (r smt) Source #

class (VariableSym r, StatementSym r smt) => IOStatement r smt where Source #

Methods

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

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

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

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

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

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

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

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

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

discardInput :: MS (r smt) Source #

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

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

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

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

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

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

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

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

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

Instances

Instances details
(IOStatement r smt, VariableValue r, VariableElim r, Literal r) => IOStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

print :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

printLn :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

printFile :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

printFileLn :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

getInput :: SVariable (LoggingFor r) -> MS (LoggingFor r smt) Source #

discardInput :: MS (LoggingFor r smt) Source #

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

discardFileInput :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

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

closeFile :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

discardFileLine :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

class (VariableSym r, StatementSym r smt) => StringStatement r smt where Source #

Methods

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

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

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

class (VariableSym r, StatementSym r smt) => FuncAppStatement r smt where Source #

Methods

inOutCall :: InOutCall r smt Source #

extInOutCall :: Library -> InOutCall r smt Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) smt Source #

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

class StatementSym r smt => CommentStatement r smt where Source #

Methods

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

Instances

Instances details
CommentStatement r smt => CommentStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class (BodySym r smt, VariableSym r) => ControlStatement r smt where Source #

Methods

break :: MS (r smt) Source #

continue :: MS (r smt) Source #

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

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

ifCond :: [(SValue r, MS (r Body))] -> MS (r Body) -> MS (r smt) Source #

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

switch :: SValue r -> [(SValue r, MS (r Body))] -> MS (r Body) -> MS (r smt) Source #

ifExists :: SValue r -> MS (r Body) -> MS (r Body) -> MS (r smt) Source #

for :: MS (r smt) -> SValue r -> MS (r smt) -> MS (r Body) -> MS (r smt) Source #

forRange :: SVariable r -> SValue r -> SValue r -> SValue r -> MS (r Body) -> MS (r smt) Source #

forEach :: SVariable r -> SValue r -> MS (r Body) -> MS (r smt) Source #

while :: SValue r -> MS (r Body) -> MS (r smt) Source #

tryCatch :: MS (r Body) -> MS (r Body) -> MS (r smt) Source #

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

ifNoElse :: ControlStatement r smt => [(SValue r, MS (r Body))] -> MS (r smt) Source #

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

class TypeSym r => VariableSym r where Source #

Methods

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

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

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

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

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

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

class VariableSym r => VariableElim r where Source #

Methods

variableName :: r Variable -> String Source #

variableType :: r Variable -> r TypeData Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class TypeSym r => ValueSym r where Source #

Methods

valueType :: r Value -> r TypeData Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => Argument r where Source #

Methods

pointerArg :: SValue r -> SValue r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => MathConstant r where Source #

Methods

pi :: SValue r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: SValue (LoggingFor r) Source #

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

Methods

valueOf :: SVariable r -> SValue r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class ValueSym r => NumericExpression r where Source #

Methods

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

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

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

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

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

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

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

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

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

log :: SValue r -> SValue r Source #

ln :: SValue r -> SValue r Source #

exp :: SValue r -> SValue r Source #

sin :: SValue r -> SValue r Source #

cos :: SValue r -> SValue r Source #

tan :: SValue r -> SValue r Source #

csc :: SValue r -> SValue r Source #

sec :: SValue r -> SValue r Source #

cot :: SValue r -> SValue r Source #

arcsin :: SValue r -> SValue r Source #

arccos :: SValue r -> SValue r Source #

arctan :: SValue r -> SValue r Source #

floor :: SValue r -> SValue r Source #

ceil :: SValue r -> SValue r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class ValueSym r => BooleanExpression r where Source #

Methods

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

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

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

class ValueSym r => Comparison r where Source #

Methods

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

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

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

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

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

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

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

Methods

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

funcAppMixedArgs :: MixedCall r Source #

extFuncAppMixedArgs :: Library -> MixedCall r Source #

libFuncAppMixedArgs :: Library -> MixedCall r Source #

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

notNull :: SValue r -> SValue r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

funcApp :: ValueExpression r => PosCall r Source #

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

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

class ValueSym r => FunctionSym r Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Methods

makeRef :: SValue r -> SValue r Source #

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

maybeDeref :: SValue r -> SValue r Source #

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

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class IndexTranslator r => Array r where Source #

Methods

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

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

arrayLength :: SValue r -> SValue r Source #

Given an array, return its length

arrayCopy :: SValue r -> SValue r Source #

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

class (IndexTranslator r, StatementSym r smt) => List r smt where Source #

Methods

listSize :: SValue r -> SValue r Source #

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

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

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

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

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

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

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

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

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

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

class ValueSym r => Set r where Source #

Methods

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

Checks membership Arguments are: Set, Value

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

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

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

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

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

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

class (IndexTranslator r, Literal r) => NativeVector r where Source #

Vector operations for languages with native vector support (e.g. MATLAB, Julia). Expression-based: every operation takes and returns SValues, so operations compose like math (e.g. vecAdd (vecScale s a) b). Vectors have their own vecType and litVec so callers don't depend on how vectors are represented; these default to listType and litList.

Minimal complete definition

vecScale, vecAdd, vecIndex, vecDot, vecMag, vecUnit

Methods

vecType :: VS (r TypeData) -> VS (r TypeData) Source #

The type of a vector with the given element type. Defaults to listType; a language may override it to use a distinct vector representation.

litVec :: VS (r TypeData) -> [SValue r] -> SValue r Source #

A vector literal with the given element type and elements. Defaults to litList.

vecScale :: SValue r -> SValue r -> SValue r Source #

Scales a vector by a scalar. Arguments are: Scalar, Vector

vecAdd :: SValue r -> SValue r -> SValue r Source #

Adds two vectors elementwise. Arguments are: Vector, Vector

vecIndex :: SValue r -> SValue r -> SValue r Source #

Gets the element of a vector at an index. Arguments are: Vector, Index

vecDot :: SValue r -> SValue r -> SValue r Source #

Dot product of two vectors (returns a scalar). Arguments are: Vector, Vector

vecMag :: SValue r -> SValue r Source #

Euclidean norm (magnitude) of a vector (returns a scalar). Argument is: Vector

vecUnit :: SValue r -> SValue r Source #

Unit vector in the direction of a vector (returns a vector). Argument is: Vector

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

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

listIndexExists :: (List r smt, Comparison r) => SValue r -> SValue r -> SValue r Source #

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

class VisibilitySym r vis | r -> vis where Source #

Methods

private :: r vis Source #

public :: r vis Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

class (BodySym r smt, ParameterSym r, VisibilitySym r vis) => MethodSym r vis smt md | r -> md where Source #

Methods

docMain :: MS (r Body) -> MS (r md) Source #

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

mainFunction :: MS (r Body) -> MS (r md) Source #

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

inOutFunc :: Label -> r vis -> InOutFunc r md Source #

docInOutFunc :: Label -> r vis -> DocInOutFunc r md Source #

Instances

Instances details
MethodSym r vis smt md => MethodSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

docMain :: MS (LoggingFor r Body) -> MS (LoggingFor r md) Source #

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

mainFunction :: MS (LoggingFor r Body) -> MS (LoggingFor r md) Source #

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

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

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

class MethodSym r vis smt md => ModuleSym r vis smt md where Source #

Methods

buildModule :: Label -> [Label] -> [MS (r md)] -> FS (r Module) Source #

Instances

Instances details
ModuleSym r vis smt md => ModuleSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildModule :: Label -> [Label] -> [MS (LoggingFor r md)] -> FS (LoggingFor r Module) 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 #

unJLC :: JuliaCode a -> a Source #

unMLC :: MatlabCode a -> a Source #

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

Constructors

LC 

Fields

Instances

Instances details
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 #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

newObjMixedArgs :: MixedCtorCall (LoggingFor r) Source #

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

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

pi :: SValue (LoggingFor r) Source #

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

AttachmentSym r att => AttachmentSym (LoggingFor r) att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

selfInOutCall :: InOutCall (LoggingFor r) smt Source #

(OOStatement r smt, VariableElim r) => OOStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

StrategyPattern r smt => StrategyPattern (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(AssignStatement r smt, IOStatement r smt, VariableValue r, VariableElim r, Literal r) => AssignStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

BlockSym r smt => BlockSym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

BodySym r smt => BodySym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

CommentStatement r smt => CommentStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

ControlStatement r smt => ControlStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(DeclStatement r smt, IOStatement r smt, VariableValue r, VariableElim r, Literal r) => DeclStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

inOutCall :: InOutCall (LoggingFor r) smt Source #

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

(IOStatement r smt, VariableValue r, VariableElim r, Literal r) => IOStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

print :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

printLn :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

printFile :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

printFileLn :: SValue (LoggingFor r) -> SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

getInput :: SVariable (LoggingFor r) -> MS (LoggingFor r smt) Source #

discardInput :: MS (LoggingFor r smt) Source #

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

discardFileInput :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

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

closeFile :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

discardFileLine :: SValue (LoggingFor r) -> MS (LoggingFor r smt) Source #

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

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

(SharedStatement r smt, VariableElim r) => SharedStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

StatementSym r smt => StatementSym (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

emptyStmt :: MS (LoggingFor r smt) Source #

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

(StringStatement r smt, IOStatement r smt, VariableValue r, VariableElim r, Literal r) => StringStatement (LoggingFor r) smt Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

StateVarSym r vis svr att => StateVarSym (LoggingFor r) vis svr att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

FileSym r vis smt md => FileSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ModuleSym r vis smt md => ModuleSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

buildModule :: Label -> [Label] -> [MS (LoggingFor r md)] -> FS (LoggingFor r Module) Source #

MethodSym r vis smt md => MethodSym (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

docMain :: MS (LoggingFor r Body) -> MS (LoggingFor r md) Source #

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

mainFunction :: MS (LoggingFor r Body) -> MS (LoggingFor r md) Source #

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

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

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

SharedProg r vis smt md => SharedProg (LoggingFor r) vis smt md Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

OOMethodSym r vis smt md att => OOMethodSym (LoggingFor r) vis smt md att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ProcProg r vis smt md prg => ProcProg (LoggingFor r) vis smt md prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ProgramSym r vis smt md prg => ProgramSym (LoggingFor r) vis smt md prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

ClassSym r vis smt md svr att => ClassSym (LoggingFor r) vis smt md svr att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

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

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

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

FileSym r vis smt md svr att => FileSym (LoggingFor r) vis smt md svr att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ModuleSym r vis smt md svr att => ModuleSym (LoggingFor r) vis smt md svr att Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

OOProg r vis smt md svr att prg => OOProg (LoggingFor r) vis smt md svr att prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

ProgramSym r vis smt md svr att prg => ProgramSym (LoggingFor r) vis smt md svr att prg Source # 
Instance details

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

Methods

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

class TypeSym r => TypeElim r where Source #

Instances

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

Defined in Drasil.Shared.LanguageRenderer.LoggingFor

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

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