| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Drasil.GOOL
Description
re-export smart constructors for external code writing
Synopsis
- type Label = String
- type GSProgram (a :: k -> Type) (prg :: k) = GS (a prg)
- type Body = Doc
- type CS = State ClassState
- type FS = State FileState
- type MS = State MethodState
- type VS = State ValueState
- type Value = ValData
- type CSStateVar (r :: k -> Type) (stvr :: k) = CS (r stvr)
- type NamedArgs (r :: k -> Type) (var :: k) (val :: k) = [(VS (r var), VS (r val))]
- type Initializers (r :: k -> Type) (var :: k) (val :: k) = [(VS (r var), VS (r val))]
- 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
- class ProgramSym (r :: k -> Type) (prg :: k) (file :: k) | r -> prg file where
- class FileSym (r :: k -> Type) (file :: k) (mod :: k) | r -> file mod where
- class AttachmentSym (r :: k -> Type) (attch :: k) | r -> attch where
- classLevel :: r attch
- instanceLevel :: r attch
- class BodySym (r :: k -> Type) (bod :: k) (block :: k) | r -> bod block where
- bodyStatements :: forall {k} r (block :: k) (stmt :: k) (bod :: k). (BlockSym r block stmt, BodySym r bod block) => [MS (r stmt)] -> MS (r bod)
- oneLiner :: forall {k} r (block :: k) (stmt :: k) (bod :: k). (BlockSym r block stmt, BodySym r bod block) => MS (r stmt) -> MS (r bod)
- class BlockSym (r :: k -> Type) (block :: k) (stmt :: k) | r -> block stmt where
- class TypeSym (r :: k -> Type) (typ :: k) | r -> typ where
- bool :: VS (r typ)
- int :: VS (r typ)
- float :: VS (r typ)
- double :: VS (r typ)
- char :: VS (r typ)
- string :: VS (r typ)
- infile :: VS (r typ)
- outfile :: VS (r typ)
- referenceType :: VS (r typ) -> VS (r typ)
- listType :: VS (r typ) -> VS (r typ)
- setType :: VS (r typ) -> VS (r typ)
- arrayType :: VS (r typ) -> VS (r typ)
- innerType :: VS (r typ) -> VS (r typ)
- funcType :: [VS (r typ)] -> VS (r typ) -> VS (r typ)
- void :: VS (r typ)
- class OOTypeSym (r :: k -> Type) (typ :: k) | r -> typ where
- class BinderSym (r :: k -> Type) (binder :: k) (typ :: k) | r -> binder typ where
- class EmptyStatement (r :: k -> Type) (stmt :: k) | r -> stmt where
- class MultiStatement (r :: k -> Type) (stmt :: k) | r -> stmt where
- class ValueStatement (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where
- class AssignStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- (&=) :: forall {k} r (stmt :: k) (var :: k) (val :: k). AssignStatement r stmt var val => VS (r var) -> VS (r val) -> MS (r stmt)
- class DeclStatement (r :: k -> Type) (bod :: k) (stmt :: k) (var :: k) (scope :: k) (val :: k) | r -> bod stmt var scope val where
- varDec :: VS (r var) -> r scope -> MS (r stmt)
- varDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt)
- listDec :: Integer -> VS (r var) -> r scope -> MS (r stmt)
- listDecDef :: VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt)
- setDec :: VS (r var) -> r scope -> MS (r stmt)
- setDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt)
- arrayDec :: Integer -> VS (r val) -> VS (r var) -> r scope -> MS (r stmt)
- arrayDecDef :: VS (r var) -> r scope -> [VS (r val)] -> MS (r stmt)
- constDecDef :: VS (r var) -> r scope -> VS (r val) -> MS (r stmt)
- funcDecDef :: VS (r var) -> r scope -> [VS (r var)] -> MS (r bod) -> MS (r stmt)
- class OODeclStatement (r :: k -> Type) (stmt :: k) (var :: k) (scope :: k) (val :: k) | r -> stmt var scope val where
- 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)
- 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)
- class PrintConsole (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where
- class ReadConsole (r :: k -> Type) (stmt :: k) (var :: k) | r -> stmt var where
- getInput :: VS (r var) -> MS (r stmt)
- discardInput :: MS (r stmt)
- class FileHandling (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- class PrintFile (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where
- class ReadFile (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- getFileInput :: VS (r val) -> VS (r var) -> MS (r stmt)
- discardFileInput :: VS (r val) -> MS (r stmt)
- getFileInputLine :: VS (r val) -> VS (r var) -> MS (r stmt)
- discardFileLine :: VS (r val) -> MS (r stmt)
- getFileInputAll :: VS (r val) -> VS (r var) -> MS (r stmt)
- class StringStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- stringSplit :: Char -> VS (r var) -> VS (r val) -> MS (r stmt)
- stringListVals :: [VS (r var)] -> VS (r val) -> MS (r stmt)
- stringListLists :: [VS (r var)] -> VS (r val) -> MS (r stmt)
- class FuncAppStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- inOutCall :: InOutCall r stmt var val
- extInOutCall :: Library -> InOutCall r stmt var val
- class OOFuncAppStatement (r :: k -> Type) (stmt :: k) (var :: k) (val :: k) | r -> stmt var val where
- selfInOutCall :: InOutCall r stmt var val
- class CommentStatement (r :: k -> Type) (stmt :: k) | r -> stmt where
- 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)
- 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)
- class ControlStatement (r :: k -> Type) (bod :: k) (stmt :: k) (var :: k) (val :: k) | r -> bod stmt var val where
- break :: MS (r stmt)
- continue :: MS (r stmt)
- returnStmt :: VS (r val) -> MS (r stmt)
- throw :: Label -> MS (r stmt)
- ifCond :: [(VS (r val), MS (r bod))] -> MS (r bod) -> MS (r stmt)
- switch :: VS (r val) -> [(VS (r val), MS (r bod))] -> MS (r bod) -> MS (r stmt)
- ifExists :: VS (r val) -> MS (r bod) -> MS (r bod) -> MS (r stmt)
- for :: MS (r stmt) -> VS (r val) -> MS (r stmt) -> MS (r bod) -> MS (r stmt)
- forRange :: VS (r var) -> VS (r val) -> VS (r val) -> VS (r val) -> MS (r bod) -> MS (r stmt)
- forEach :: VS (r var) -> VS (r val) -> MS (r bod) -> MS (r stmt)
- while :: VS (r val) -> MS (r bod) -> MS (r stmt)
- tryCatch :: MS (r bod) -> MS (r bod) -> MS (r stmt)
- assert :: VS (r val) -> VS (r val) -> MS (r stmt)
- 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)
- 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)
- class VariableSym (r :: k -> Type) (var :: k) (typ :: k) | r -> var typ where
- class ScopeSym (r :: k -> Type) (scope :: k) | r -> scope where
- class OOVariableSym (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ where
- classVar :: Label -> VS (r typ) -> VS (r var)
- classConst :: Label -> VS (r typ) -> VS (r var)
- classVarAccess :: VS (r typ) -> VS (r var) -> VS (r var)
- extClassVarAccess :: VS (r typ) -> VS (r var) -> VS (r var)
- instanceVarAccess :: VS (r val) -> VS (r var) -> VS (r var)
- class SelfSym (r :: k -> Type) (var :: k) | r -> var where
- 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)
- class VariableElim (r :: k -> Type) (var :: k) (typ :: k) | r -> var typ where
- variableName :: r var -> String
- variableType :: r var -> r typ
- ($->) :: forall {k} r (var :: k) (val :: k) (typ :: k). OOVariableSym r var val typ => VS (r val) -> VS (r var) -> VS (r var)
- listOf :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => Label -> VS (r typ) -> VS (r var)
- listVar :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => Label -> VS (r typ) -> VS (r var)
- class ValueSym (r :: k -> Type) (val :: k) (typ :: k) | r -> val typ where
- valueType :: r val -> r typ
- class Argument (r :: k -> Type) (val :: k) | r -> val where
- pointerArg :: VS (r val) -> VS (r val)
- class Literal (r :: k -> Type) (val :: k) (typ :: k) | r -> val typ where
- litTrue :: VS (r val)
- litFalse :: VS (r val)
- litChar :: Char -> VS (r val)
- litDouble :: Double -> VS (r val)
- litFloat :: Float -> VS (r val)
- litInt :: Integer -> VS (r val)
- litString :: String -> VS (r val)
- litArray :: VS (r typ) -> [VS (r val)] -> VS (r val)
- litList :: VS (r typ) -> [VS (r val)] -> VS (r val)
- litSet :: VS (r typ) -> [VS (r val)] -> VS (r val)
- class MathConstant (r :: k -> Type) (val :: k) | r -> val where
- class VariableValue (r :: k -> Type) (var :: k) (val :: k) | r -> var val where
- class CommandLineArgs (r :: k -> Type) (val :: k) | r -> val where
- class NumericExpression (r :: k -> Type) (val :: k) | r -> val where
- (#~) :: VS (r val) -> VS (r val)
- (#/^) :: VS (r val) -> VS (r val)
- (#|) :: VS (r val) -> VS (r val)
- (#+) :: VS (r val) -> VS (r val) -> VS (r val)
- (#-) :: VS (r val) -> VS (r val) -> VS (r val)
- (#*) :: VS (r val) -> VS (r val) -> VS (r val)
- (#/) :: VS (r val) -> VS (r val) -> VS (r val)
- (#%) :: VS (r val) -> VS (r val) -> VS (r val)
- (#^) :: VS (r val) -> VS (r val) -> VS (r val)
- log :: VS (r val) -> VS (r val)
- ln :: VS (r val) -> VS (r val)
- exp :: VS (r val) -> VS (r val)
- sin :: VS (r val) -> VS (r val)
- cos :: VS (r val) -> VS (r val)
- tan :: VS (r val) -> VS (r val)
- csc :: VS (r val) -> VS (r val)
- sec :: VS (r val) -> VS (r val)
- cot :: VS (r val) -> VS (r val)
- arcsin :: VS (r val) -> VS (r val)
- arccos :: VS (r val) -> VS (r val)
- arctan :: VS (r val) -> VS (r val)
- floor :: VS (r val) -> VS (r val)
- ceil :: VS (r val) -> VS (r val)
- class BooleanExpression (r :: k -> Type) (val :: k) | r -> val where
- class Comparison (r :: k -> Type) (val :: k) | r -> val where
- class ValueExpression (r :: k -> Type) (var :: k) (val :: k) (binder :: k) (typ :: k) | r -> var val binder typ where
- inlineIf :: VS (r val) -> VS (r val) -> VS (r val) -> VS (r val)
- funcAppMixedArgs :: MixedCall r var val typ
- extFuncAppMixedArgs :: Library -> MixedCall r var val typ
- libFuncAppMixedArgs :: Library -> MixedCall r var val typ
- lambda :: [VS (r binder)] -> VS (r val) -> VS (r val)
- notNull :: VS (r val) -> VS (r val)
- class InternalValueExp (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ
- class OOValueExpression (r :: k -> Type) (var :: k) (val :: k) (typ :: k) | r -> var val typ where
- newObjMixedArgs :: MixedCtorCall r var val typ
- extNewObjMixedArgs :: Library -> MixedCtorCall r var val typ
- libNewObjMixedArgs :: Library -> MixedCtorCall r var val typ
- funcApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => PosCall r val typ
- 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)
- 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
- extFuncApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => Library -> PosCall r val typ
- libFuncApp :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => Library -> PosCall r val typ
- newObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => PosCtorCall r val typ
- extNewObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => Library -> PosCtorCall r val typ
- libNewObj :: forall {k} r (var :: k) (val :: k) (typ :: k). OOValueExpression r var val typ => Library -> PosCtorCall r val typ
- exists :: forall {k} r (var :: k) (val :: k) (binder :: k) (typ :: k). ValueExpression r var val binder typ => VS (r val) -> VS (r val)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- class OOFunctionSym (r :: Type -> Type) val typ | r -> val typ where
- ($.) :: OOFunctionSym r val typ => VS (r val) -> VS (r FuncData) -> VS (r val)
- selfAccess :: (VariableValue r var val, SelfSym r var, OOFunctionSym r val typ) => VS (r FuncData) -> VS (r val)
- class GetSet (r :: k -> Type) (var :: k) (val :: k) | r -> var val where
- class Reference (r :: k -> Type) (val :: k) | r -> val where
- class Array (r :: k -> Type) (var :: k) (val :: k) | r -> var val where
- class List (r :: k -> Type) (val :: k) | r -> val where
- class ListStatement (r :: k -> Type) (stmt :: k) (val :: k) | r -> stmt val where
- class InternalList (r :: k -> Type) (block :: k) (var :: k) (val :: k) | r -> block var val
- 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)
- class Set (r :: k -> Type) (val :: k) | r -> val where
- listIndexExists :: forall {k} r (val :: k). (List r val, Comparison r val) => VS (r val) -> VS (r val) -> VS (r val)
- at :: forall {k} r (val :: k). List r val => VS (r val) -> VS (r val) -> VS (r val)
- class ObserverPattern (r :: Type -> Type) stmt typ | r -> stmt typ where
- notifyObservers :: VS (r FuncData) -> VS (r typ) -> MS (r stmt)
- class StrategyPattern (r :: k -> Type) (bod :: k) (block :: k) (var :: k) (val :: k) | r -> bod block var val where
- class VisibilitySym (r :: k -> Type) (vis :: k) | r -> vis where
- class ParameterSym (r :: k -> Type) (param :: k) (var :: k) | r -> param var where
- 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
- docMain :: MS (r bod) -> MS (r mthd)
- function :: Label -> r vis -> VS (r typ) -> [MS (r param)] -> MS (r bod) -> MS (r mthd)
- mainFunction :: MS (r bod) -> MS (r mthd)
- docFunc :: String -> [String] -> Maybe String -> MS (r mthd) -> MS (r mthd)
- inOutFunc :: Label -> r vis -> InOutFunc r mthd bod var
- docInOutFunc :: Label -> r vis -> DocInOutFunc r mthd bod var
- 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
- method :: Label -> r vis -> r attch -> VS (r typ) -> [MS (r param)] -> MS (r bod) -> MS (r mthd)
- getMethod :: VS (r var) -> MS (r mthd)
- setMethod :: VS (r var) -> MS (r mthd)
- constructor :: [MS (r param)] -> Initializers r var val -> MS (r bod) -> MS (r mthd)
- inOutMethod :: Label -> r vis -> r attch -> InOutFunc r mthd bod var
- docInOutMethod :: Label -> r vis -> r attch -> DocInOutFunc r mthd bod var
- 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)
- 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)
- 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)
- 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)
- class StateVarSym (r :: k -> Type) (stvr :: k) (attch :: k) (vis :: k) (var :: k) (val :: k) | r -> stvr attch vis var val where
- stateVar :: r vis -> r attch -> VS (r var) -> CSStateVar r stvr
- stateVarDef :: r vis -> r attch -> VS (r var) -> VS (r val) -> CSStateVar r stvr
- constVar :: r vis -> VS (r var) -> VS (r val) -> CSStateVar r stvr
- 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
- 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
- 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
- class ClassSym (r :: k -> Type) (cls :: k) (stvr :: k) (mthd :: k) | r -> cls stvr mthd where
- buildClass :: Maybe Label -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r cls)
- extraClass :: Label -> Maybe Label -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r cls)
- implementingClass :: Label -> [Label] -> [CSStateVar r stvr] -> [MS (r mthd)] -> [MS (r mthd)] -> CS (r cls)
- docClass :: String -> CS (r cls) -> CS (r cls)
- class ModuleSym (r :: k -> Type) (mod :: k) (cls :: k) (mthd :: k) | r -> mod cls mthd where
- convType :: forall {k} r (typ :: k). TypeSym r typ => CodeType -> VS (r typ)
- convTypeOO :: forall {k} r (typ :: k). (TypeSym r typ, OOTypeSym r typ) => CodeType -> VS (r typ)
- data ProgData
- data FileData
- data ModData
- data TypeData
- data VisibilityTag
- data ParamData
- data CodeType
- data GOOLState = GS {}
- lensMStoVS :: Lens' MethodState ValueState
- headers :: Lens' GOOLState [FilePath]
- sources :: Lens' GOOLState [FilePath]
- mainMod :: Lens' GOOLState (Maybe FilePath)
- initialState :: GOOLState
- onStateValue :: (a -> b) -> State s a -> State s b
- onCodeList :: Monad m => ([a] -> b) -> [m a] -> m b
- unCI :: CodeInfoOO a -> a
- unPC :: PythonCode a -> a
- unJC :: JavaCode a -> a
- unCSC :: CSharpCode a -> a
- unCPPC :: CppCode CppSrcCode CppHdrCode a -> a
- unSC :: SwiftCode a -> a
- pyName :: String
- pyVersion :: String
- jName :: String
- jVersion :: String
- csName :: String
- csVersion :: String
- cppName :: String
- cppVersion :: String
- swiftName :: String
- swiftVersion :: String
- newtype LoggingFor (r :: Type -> Type) a = LC {
- unLC :: r a
- class TypeElim (r :: k -> Type) (typ :: k) | r -> typ where
- getCodeType :: r typ -> CodeType
- getTypeString :: UnRepr r TypeData => r TypeData -> String
Documentation
type CSStateVar (r :: k -> Type) (stvr :: k) = CS (r stvr) 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
| 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 # | |
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
| ProgramSym r prg file => ProgramSym (LoggingFor r :: Type -> Type) (prg :: Type) (file :: Type) Source # | |
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
| FileSym r file mod => FileSym (LoggingFor r :: Type -> Type) (file :: Type) (mod :: Type) Source # | |
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
Instances
| AttachmentSym r attch => AttachmentSym (LoggingFor r :: Type -> Type) (attch :: Type) Source # | |
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 #
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
| BodySym r bod block => BodySym (LoggingFor r :: Type -> Type) (bod :: Type) (block :: Type) Source # | |
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.
Instances
| BlockSym r block stmt => BlockSym (LoggingFor r :: Type -> Type) (block :: Type) (stmt :: Type) Source # | |
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
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 #
Instances
| TypeSym r typ => TypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # | |
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 #
Instances
| OOTypeSym r typ => OOTypeSym (LoggingFor r :: Type -> Type) (typ :: Type) Source # | |
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.
Instances
| BinderSym r binder typ => BinderSym (LoggingFor r :: Type -> Type) (binder :: Type) (typ :: Type) Source # | |
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 #
Instances
| EmptyStatement r stmt => EmptyStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # | |
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
| MultiStatement r stmt => MultiStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # | |
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 #
Instances
| ValueStatement r stmt val => ValueStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (val :: Type) Source # | |
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 #
Instances
| (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 # | |
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
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
| (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 # | |
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
| PrintConsole r stmt val => PrintConsole (LoggingFor r :: Type -> Type) (stmt :: Type) (val :: Type) Source # | |
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 #
Instances
| (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 # | |
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 #
Instances
| FileHandling r stmt var val => FileHandling (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # | |
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
| PrintFile r stmt val => PrintFile (LoggingFor r :: Type -> Type) (stmt :: Type) (val :: Type) Source # | |
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
| (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 # | |
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
| (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 # | |
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
| FuncAppStatement r stmt var val => FuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # | |
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
| OOFuncAppStatement r stmt var val => OOFuncAppStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (var :: Type) (val :: Type) Source # | |
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 #
Instances
| CommentStatement r stmt => CommentStatement (LoggingFor r :: Type -> Type) (stmt :: Type) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor | |
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
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 #
Instances
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
| VariableSym r var typ => VariableSym (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # | |
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.
Instances
| ScopeSym r scope => ScopeSym (LoggingFor r :: Type -> Type) (scope :: Type) Source # | |
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
| OOVariableSym r var val typ => OOVariableSym (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # | |
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 #
Instances
| SelfSym r var => SelfSym (LoggingFor r :: Type -> Type) (var :: Type) Source # | |
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 #
Instances
| VariableElim r var typ => VariableElim (LoggingFor r :: Type -> Type) (var :: Type) (typ :: Type) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods variableName :: LoggingFor r var -> String Source # variableType :: LoggingFor r var -> LoggingFor r typ Source # | |
($->) :: 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.
Instances
| ValueSym r val typ => ValueSym (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # | |
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
| Argument r val => Argument (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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 #
Instances
| Literal r val typ => Literal (LoggingFor r :: Type -> Type) (val :: Type) (typ :: Type) Source # | |
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 #
Instances
| MathConstant r val => MathConstant (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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 #
Instances
| VariableValue r var val => VariableValue (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # | |
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 #
Instances
| CommandLineArgs r val => CommandLineArgs (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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 #
Instances
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
| BooleanExpression r val => BooleanExpression (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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
| Comparison r val => Comparison (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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 #
Instances
| ValueExpression r var val binder typ => ValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (binder :: Type) (typ :: Type) Source # | |
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
| InternalValueExp r var val typ => InternalValueExp (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # | |
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
| OOValueExpression r var val typ => OOValueExpression (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) (typ :: Type) Source # | |
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
| OOFunctionSym r val typ => OOFunctionSym (LoggingFor r) val typ Source # | |
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 # | |
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
| GetSet r var val => GetSet (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # | |
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
| Reference r val => Reference (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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
| Array r var val => Array (LoggingFor r :: Type -> Type) (var :: Type) (val :: Type) Source # | |
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
| List r val => List (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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
| ListStatement r stmt val => ListStatement (LoggingFor r :: Type -> Type) (stmt :: Type) (val :: Type) Source # | |
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
| InternalList r block var val => InternalList (LoggingFor r :: Type -> Type) (block :: Type) (var :: Type) (val :: Type) Source # | |
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
| Set r val => Set (LoggingFor r :: Type -> Type) (val :: Type) Source # | |
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 #
class ObserverPattern (r :: Type -> Type) stmt typ | r -> stmt typ where Source #
Instances
| ObserverPattern r stmt typ => ObserverPattern (LoggingFor r) stmt typ Source # | |
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
| StrategyPattern r bod block var val => StrategyPattern (LoggingFor r :: Type -> Type) (bod :: Type) (block :: Type) (var :: Type) (val :: Type) Source # | |
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.
Instances
| VisibilitySym r vis => VisibilitySym (LoggingFor r :: Type -> Type) (vis :: Type) Source # | |
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
| ParameterSym r param var => ParameterSym (LoggingFor r :: Type -> Type) (param :: Type) (var :: Type) Source # | |
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
| 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 # | |
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
| 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 # | |
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
| StateVarSym r stvr attch vis var val => StateVarSym (LoggingFor r :: Type -> Type) (stvr :: Type) (attch :: Type) (vis :: Type) (var :: Type) (val :: Type) Source # | |
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
Instances
| ClassSym r cls stvr mthd => ClassSym (LoggingFor r :: Type -> Type) (cls :: Type) (stvr :: Type) (mthd :: Type) Source # | |
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
| ModuleSym r mod cls mthd => ModuleSym (LoggingFor r :: Type -> Type) (mod :: Type) (cls :: Type) (mthd :: Type) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods buildModule :: Label -> [Label] -> [MS (LoggingFor r mthd)] -> [CS (LoggingFor r cls)] -> FS (LoggingFor r mod) Source # | |
convTypeOO :: forall {k} r (typ :: k). (TypeSym r typ, OOTypeSym r typ) => CodeType -> VS (r typ) Source #
data VisibilityTag Source #
Instances
| Eq VisibilityTag Source # | |
Defined in Drasil.Shared.AST Methods (==) :: VisibilityTag -> VisibilityTag -> Bool # (/=) :: VisibilityTag -> VisibilityTag -> Bool # | |
Constructors
| Boolean | |
| Integer | |
| Float | |
| Double | |
| Char | |
| String | |
| InFile | |
| OutFile | |
| Reference CodeType | |
| List CodeType | |
| Set CodeType | |
| Array CodeType | |
| Object ClassName | |
| Func [CodeType] CodeType | |
| Void |
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 #
cppVersion :: String Source #
newtype LoggingFor (r :: Type -> Type) a Source #
Instances
class TypeElim (r :: k -> Type) (typ :: k) | r -> typ where Source #
Methods
getCodeType :: r typ -> CodeType Source #
Instances
| TypeElim r typ => TypeElim (LoggingFor r :: Type -> Type) (typ :: Type) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods getCodeType :: LoggingFor r typ -> CodeType Source # | |