| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.GOOL
Description
re-export smart constructors for external code writing
Synopsis
- type Label = String
- type GSProgram a = GS (a (Program a))
- type SFile a = FS (a (File a))
- type MSBody a = MS (a (Body a))
- type MSBlock a = MS (a (Block a))
- type VSType a = VS (a TypeData)
- type SVariable a = VS (a (Variable a))
- type SValue a = VS (a (Value a))
- type VSFunction a = VS (a (Function a))
- type MSStatement a = MS (a (Statement a))
- type MSParameter a = MS (a (Parameter a))
- type SMethod a = MS (a (Method a))
- type CSStateVar a = CS (a (StateVar a))
- type SClass a = CS (a (Class a))
- type FSModule a = FS (a (Module a))
- type NamedArgs r = [(SVariable r, SValue r)]
- type Initializers r = [(SVariable r, SValue r)]
- class (UnRepr r TypeData, AssignStatement r, DeclStatement r, IOStatement r, StringStatement r, FunctionSym r, FuncAppStatement r, CommentStatement r, ControlStatement r, InternalList r, Argument r, Literal r, MathConstant r, VariableValue r, CommandLineArgs r, NumericExpression r, BooleanExpression r, Comparison r, ValueExpression r, IndexTranslator r, Array r, List r, Set r, VariableElim r, MethodSym r, ScopeSym r, BinderSym r, Reference r) => SharedProg r
- class (SharedProg r, ProgramSym r, OOVariableValue r, OODeclStatement r, OOFuncAppStatement r, OOValueExpression r, InternalValueExp r, GetSet r, ObserverPattern r, StrategyPattern r) => OOProg r
- class FileSym r => ProgramSym r where
- class ModuleSym r => FileSym r where
- class AttachmentSym r where
- type Attachment r
- classLevel :: r (Attachment r)
- instanceLevel :: r (Attachment r)
- class BlockSym r => BodySym r where
- bodyStatements :: BodySym r => [MSStatement r] -> MSBody r
- oneLiner :: BodySym r => MSStatement r -> MSBody r
- class StatementSym r => BlockSym r where
- type Block r
- block :: [MSStatement r] -> MSBlock r
- class TypeSym r where
- bool :: VSType r
- int :: VSType r
- float :: VSType r
- double :: VSType r
- char :: VSType r
- string :: VSType r
- infile :: VSType r
- outfile :: VSType r
- referenceType :: VSType r -> VSType r
- listType :: VSType r -> VSType r
- setType :: VSType r -> VSType r
- arrayType :: VSType r -> VSType r
- innerType :: VSType r -> VSType r
- funcType :: [VSType r] -> VSType r -> VSType r
- void :: VSType r
- class TypeSym r => OOTypeSym r where
- class TypeSym r => BinderSym r where
- class ValueSym r => StatementSym r where
- type Statement r
- valStmt :: SValue r -> MSStatement r
- emptyStmt :: MSStatement r
- multi :: [MSStatement r] -> MSStatement r
- class (VariableSym r, StatementSym r) => AssignStatement r where
- (&-=) :: SVariable r -> SValue r -> MSStatement r
- (&+=) :: SVariable r -> SValue r -> MSStatement r
- (&++) :: SVariable r -> MSStatement r
- (&--) :: SVariable r -> MSStatement r
- assign :: SVariable r -> SValue r -> MSStatement r
- (&=) :: AssignStatement r => SVariable r -> SValue r -> MSStatement r
- class (VariableSym r, StatementSym r, ScopeSym r) => DeclStatement r where
- varDec :: SVariable r -> r ScopeData -> MSStatement r
- varDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r
- listDec :: Integer -> SVariable r -> r ScopeData -> MSStatement r
- listDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r
- setDec :: SVariable r -> r ScopeData -> MSStatement r
- setDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r
- arrayDec :: Integer -> SVariable r -> r ScopeData -> MSStatement r
- arrayDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r
- constDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r
- funcDecDef :: SVariable r -> r ScopeData -> [SVariable r] -> MSBody r -> MSStatement r
- class (DeclStatement r, OOVariableSym r) => OODeclStatement r where
- objDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r
- objDecNew :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r
- extObjDecNew :: Library -> SVariable r -> r ScopeData -> [SValue r] -> MSStatement r
- objDecNewNoParams :: OODeclStatement r => SVariable r -> r ScopeData -> MSStatement r
- extObjDecNewNoParams :: OODeclStatement r => Library -> SVariable r -> r ScopeData -> MSStatement r
- class (VariableSym r, StatementSym r) => IOStatement r where
- print :: SValue r -> MSStatement r
- printLn :: SValue r -> MSStatement r
- printStr :: String -> MSStatement r
- printStrLn :: String -> MSStatement r
- printFile :: SValue r -> SValue r -> MSStatement r
- printFileLn :: SValue r -> SValue r -> MSStatement r
- printFileStr :: SValue r -> String -> MSStatement r
- printFileStrLn :: SValue r -> String -> MSStatement r
- getInput :: SVariable r -> MSStatement r
- discardInput :: MSStatement r
- getFileInput :: SValue r -> SVariable r -> MSStatement r
- discardFileInput :: SValue r -> MSStatement r
- openFileR :: SVariable r -> SValue r -> MSStatement r
- openFileW :: SVariable r -> SValue r -> MSStatement r
- openFileA :: SVariable r -> SValue r -> MSStatement r
- closeFile :: SValue r -> MSStatement r
- getFileInputLine :: SValue r -> SVariable r -> MSStatement r
- discardFileLine :: SValue r -> MSStatement r
- getFileInputAll :: SValue r -> SVariable r -> MSStatement r
- class (VariableSym r, StatementSym r) => StringStatement r where
- stringSplit :: Char -> SVariable r -> SValue r -> MSStatement r
- stringListVals :: [SVariable r] -> SValue r -> MSStatement r
- stringListLists :: [SVariable r] -> SValue r -> MSStatement r
- class (VariableSym r, StatementSym r) => FuncAppStatement r where
- inOutCall :: InOutCall r
- extInOutCall :: Library -> InOutCall r
- class (FuncAppStatement r, OOVariableSym r) => OOFuncAppStatement r where
- selfInOutCall :: InOutCall r
- class StatementSym r => CommentStatement r where
- comment :: String -> MSStatement r
- initObserverList :: DeclStatement r => VSType r -> [SValue r] -> r ScopeData -> MSStatement r
- addObserver :: (StatementSym r, OOVariableValue r, List r) => SValue r -> MSStatement r
- class (BodySym r, VariableSym r) => ControlStatement r where
- break :: MSStatement r
- continue :: MSStatement r
- returnStmt :: SValue r -> MSStatement r
- throw :: Label -> MSStatement r
- ifCond :: [(SValue r, MSBody r)] -> MSBody r -> MSStatement r
- switch :: SValue r -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r
- ifExists :: SValue r -> MSBody r -> MSBody r -> MSStatement r
- for :: MSStatement r -> SValue r -> MSStatement r -> MSBody r -> MSStatement r
- forRange :: SVariable r -> SValue r -> SValue r -> SValue r -> MSBody r -> MSStatement r
- forEach :: SVariable r -> SValue r -> MSBody r -> MSStatement r
- while :: SValue r -> MSBody r -> MSStatement r
- tryCatch :: MSBody r -> MSBody r -> MSStatement r
- assert :: SValue r -> SValue r -> MSStatement r
- ifNoElse :: ControlStatement r => [(SValue r, MSBody r)] -> MSStatement r
- switchAsIf :: (ControlStatement r, Comparison r) => SValue r -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r
- class TypeSym r => VariableSym r where
- class ScopeSym r where
- data ScopeData
- class (VariableSym r, OOTypeSym r) => OOVariableSym r where
- classVar :: Label -> VSType r -> SVariable r
- classConst :: Label -> VSType r -> SVariable r
- classVarAccess :: VSType r -> SVariable r -> SVariable r
- extClassVarAccess :: VSType r -> SVariable r -> SVariable r
- instanceVarAccess :: SValue r -> SVariable r -> SVariable r
- class OOVariableSym r => SelfSym r where
- instanceVarSelf :: (SelfSym r, VariableValue r) => SVariable r -> SVariable r
- class VariableSym r => VariableElim r where
- variableName :: r (Variable r) -> String
- variableType :: r (Variable r) -> r TypeData
- ($->) :: OOVariableSym r => SValue r -> SVariable r -> SVariable r
- listOf :: VariableSym r => Label -> VSType r -> SVariable r
- listVar :: VariableSym r => Label -> VSType r -> SVariable r
- class TypeSym r => ValueSym r where
- class ValueSym r => Argument r where
- pointerArg :: SValue r -> SValue r
- class ValueSym r => Literal r where
- litTrue :: SValue r
- litFalse :: SValue r
- litChar :: Char -> SValue r
- litDouble :: Double -> SValue r
- litFloat :: Float -> SValue r
- litInt :: Integer -> SValue r
- litString :: String -> SValue r
- litArray :: VSType r -> [SValue r] -> SValue r
- litList :: VSType r -> [SValue r] -> SValue r
- litSet :: VSType r -> [SValue r] -> SValue r
- class ValueSym r => MathConstant r where
- class (VariableSym r, ValueSym r) => VariableValue r where
- class (VariableValue r, OOVariableSym r, SelfSym r) => OOVariableValue r
- class ValueSym r => CommandLineArgs r where
- class ValueSym r => NumericExpression r where
- (#~) :: SValue r -> SValue r
- (#/^) :: SValue r -> SValue r
- (#|) :: SValue r -> SValue r
- (#+) :: SValue r -> SValue r -> SValue r
- (#-) :: SValue r -> SValue r -> SValue r
- (#*) :: SValue r -> SValue r -> SValue r
- (#/) :: SValue r -> SValue r -> SValue r
- (#%) :: SValue r -> SValue r -> SValue r
- (#^) :: SValue r -> SValue r -> SValue r
- log :: SValue r -> SValue r
- ln :: SValue r -> SValue r
- exp :: SValue r -> SValue r
- sin :: SValue r -> SValue r
- cos :: SValue r -> SValue r
- tan :: SValue r -> SValue r
- csc :: SValue r -> SValue r
- sec :: SValue r -> SValue r
- cot :: SValue r -> SValue r
- arcsin :: SValue r -> SValue r
- arccos :: SValue r -> SValue r
- arctan :: SValue r -> SValue r
- floor :: SValue r -> SValue r
- ceil :: SValue r -> SValue r
- class ValueSym r => BooleanExpression r where
- class ValueSym r => Comparison r where
- class (VariableSym r, ValueSym r) => ValueExpression r where
- inlineIf :: SValue r -> SValue r -> SValue r -> SValue r
- funcAppMixedArgs :: MixedCall r
- extFuncAppMixedArgs :: Library -> MixedCall r
- libFuncAppMixedArgs :: Library -> MixedCall r
- lambda :: [VSBinder r] -> SValue r -> SValue r
- notNull :: SValue r -> SValue r
- class (ValueExpression r, OOVariableSym r, OOValueSym r) => OOValueExpression r where
- newObjMixedArgs :: MixedCtorCall r
- extNewObjMixedArgs :: Library -> MixedCtorCall r
- libNewObjMixedArgs :: Library -> MixedCtorCall r
- funcApp :: ValueExpression r => PosCall r
- funcAppNamedArgs :: ValueExpression r => Label -> VSType r -> NamedArgs r -> SValue r
- selfMethodCall :: (InternalValueExp r, VariableValue r, SelfSym r) => PosCall r
- extFuncApp :: ValueExpression r => Library -> PosCall r
- libFuncApp :: ValueExpression r => Library -> PosCall r
- newObj :: OOValueExpression r => PosCtorCall r
- extNewObj :: OOValueExpression r => Library -> PosCtorCall r
- libNewObj :: OOValueExpression r => Library -> PosCtorCall r
- exists :: ValueExpression r => SValue r -> SValue r
- objMethodCall :: InternalValueExp r => VSType r -> SValue r -> Label -> [SValue r] -> SValue r
- objMethodCallNamedArgs :: InternalValueExp r => VSType r -> SValue r -> Label -> NamedArgs r -> SValue r
- objMethodCallMixedArgs :: InternalValueExp r => VSType r -> SValue r -> Label -> [SValue r] -> NamedArgs r -> SValue r
- objMethodCallNoParams :: InternalValueExp r => VSType r -> SValue r -> Label -> SValue r
- classMethodCall :: InternalValueExp r => VSType r -> VSType r -> Label -> [SValue r] -> SValue r
- classMethodCallNamedArgs :: InternalValueExp r => VSType r -> VSType r -> Label -> NamedArgs r -> SValue r
- classMethodCallMixedArgs :: InternalValueExp r => VSType r -> VSType r -> Label -> [SValue r] -> NamedArgs r -> SValue r
- classMethodCallNoParams :: InternalValueExp r => VSType r -> VSType r -> Label -> SValue r
- class ValueSym r => FunctionSym r where
- type Function r
- class FunctionSym r => OOFunctionSym r where
- func :: Label -> VSType r -> [SValue r] -> VSFunction r
- objAccess :: SValue r -> VSFunction r -> SValue r
- ($.) :: OOFunctionSym r => SValue r -> VSFunction r -> SValue r
- selfAccess :: (OOVariableValue r, OOFunctionSym r) => VSFunction r -> SValue r
- class (ValueSym r, VariableSym r) => GetSet r where
- class (TypeSym r, ValueSym r) => Reference r where
- class IndexTranslator r => Array r where
- class IndexTranslator r => List r where
- listSize :: SValue r -> SValue r
- listAdd :: SValue r -> SValue r -> SValue r -> MSStatement r
- listAppend :: SValue r -> SValue r -> MSStatement r
- listAccess :: SValue r -> SValue r -> SValue r
- listSet :: SValue r -> SValue r -> SValue r -> MSStatement r
- indexOf :: SValue r -> SValue r -> SValue r
- class ValueSym r => Set r where
- listSlice :: InternalList r => SVariable r -> SValue r -> Maybe (SValue r) -> Maybe (SValue r) -> Maybe (SValue r) -> MSBlock r
- listIndexExists :: (List r, Comparison r) => SValue r -> SValue r -> SValue r
- at :: List r => SValue r -> SValue r -> SValue r
- class (StatementSym r, OOFunctionSym r) => ObserverPattern r where
- notifyObservers :: VSFunction r -> VSType r -> MSStatement r
- class (BodySym r, VariableSym r) => StrategyPattern r where
- class VisibilitySym r where
- type Visibility r
- private :: r (Visibility r)
- public :: r (Visibility r)
- class VariableSym r => ParameterSym r where
- type Parameter r
- param :: SVariable r -> MSParameter r
- pointerParam :: SVariable r -> MSParameter r
- class (BodySym r, ParameterSym r, VisibilitySym r) => MethodSym r where
- type Method r
- docMain :: MSBody r -> SMethod r
- function :: Label -> r (Visibility r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r
- mainFunction :: MSBody r -> SMethod r
- docFunc :: String -> [String] -> Maybe String -> SMethod r -> SMethod r
- inOutFunc :: Label -> r (Visibility r) -> InOutFunc r
- docInOutFunc :: Label -> r (Visibility r) -> DocInOutFunc r
- class (MethodSym r, AttachmentSym r) => OOMethodSym r where
- method :: Label -> r (Visibility r) -> r (Attachment r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r
- getMethod :: SVariable r -> SMethod r
- setMethod :: SVariable r -> SMethod r
- constructor :: [MSParameter r] -> Initializers r -> MSBody r -> SMethod r
- inOutMethod :: Label -> r (Visibility r) -> r (Attachment r) -> InOutFunc r
- docInOutMethod :: Label -> r (Visibility r) -> r (Attachment r) -> DocInOutFunc r
- privMethod :: OOMethodSym r => Label -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r
- pubMethod :: OOMethodSym r => Label -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r
- initializer :: OOMethodSym r => [MSParameter r] -> Initializers r -> SMethod r
- nonInitConstructor :: OOMethodSym r => [MSParameter r] -> MSBody r -> SMethod r
- class (VisibilitySym r, AttachmentSym r, VariableSym r) => StateVarSym r where
- type StateVar r
- stateVar :: r (Visibility r) -> r (Attachment r) -> SVariable r -> CSStateVar r
- stateVarDef :: r (Visibility r) -> r (Attachment r) -> SVariable r -> SValue r -> CSStateVar r
- constVar :: r (Visibility r) -> SVariable r -> SValue r -> CSStateVar r
- privDVar :: StateVarSym r => SVariable r -> CSStateVar r
- pubDVar :: StateVarSym r => SVariable r -> CSStateVar r
- pubSVar :: StateVarSym r => SVariable r -> CSStateVar r
- class (OOMethodSym r, StateVarSym r) => ClassSym r where
- type Class r
- buildClass :: Maybe Label -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r
- extraClass :: Label -> Maybe Label -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r
- implementingClass :: Label -> [Label] -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r
- docClass :: String -> SClass r -> SClass r
- class ClassSym r => ModuleSym r where
- convType :: TypeSym r => CodeType -> VSType r
- convTypeOO :: OOTypeSym r => CodeType -> VSType r
- data ProgData
- data FileData
- data ModData
- data VisibilityTag
- 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 (lang :: Type -> Type) a = LC {
- unLC :: lang a
- getCodeType :: UnRepr r TypeData => r TypeData -> CodeType
- getTypeString :: UnRepr r TypeData => r TypeData -> String
Documentation
type VSFunction a = VS (a (Function a)) Source #
type MSStatement a = MS (a (Statement a)) Source #
type MSParameter a = MS (a (Parameter a)) Source #
type CSStateVar a = CS (a (StateVar a)) Source #
type Initializers r = [(SVariable r, SValue r)] Source #
class (UnRepr r TypeData, AssignStatement r, DeclStatement r, IOStatement r, StringStatement r, FunctionSym r, FuncAppStatement r, CommentStatement r, ControlStatement r, InternalList r, Argument r, Literal r, MathConstant r, VariableValue r, CommandLineArgs r, NumericExpression r, BooleanExpression r, Comparison r, ValueExpression r, IndexTranslator r, Array r, List r, Set r, VariableElim r, MethodSym r, ScopeSym r, BinderSym r, Reference r) => SharedProg r Source #
Instances
class (SharedProg r, ProgramSym r, OOVariableValue r, OODeclStatement r, OOFuncAppStatement r, OOValueExpression r, InternalValueExp r, GetSet r, ObserverPattern r, StrategyPattern r) => OOProg r Source #
Instances
| OOProg lang => OOProg (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor | |
class FileSym r => ProgramSym r where Source #
Instances
| ProgramSym lang => ProgramSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Program (LoggingFor lang) Source # Methods prog :: Label -> Label -> [SFile (LoggingFor lang)] -> GSProgram (LoggingFor lang) Source # | |
class ModuleSym r => FileSym r where Source #
Methods
fileDoc :: FSModule r -> SFile r Source #
docMod :: String -> String -> [String] -> String -> SFile r -> SFile r Source #
Instances
| FileSym lang => FileSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type File (LoggingFor lang) Source # Methods fileDoc :: FSModule (LoggingFor lang) -> SFile (LoggingFor lang) Source # docMod :: String -> String -> [String] -> String -> SFile (LoggingFor lang) -> SFile (LoggingFor lang) Source # | |
class AttachmentSym r where Source #
Used to differentiate whether a member is attached to the class or the instance
Associated Types
type Attachment r Source #
Instances
| AttachmentSym lang => AttachmentSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Attachment (LoggingFor lang) Source # Methods classLevel :: LoggingFor lang (Attachment (LoggingFor lang)) Source # instanceLevel :: LoggingFor lang (Attachment (LoggingFor lang)) Source # | |
class BlockSym r => BodySym r where Source #
Instances
| BodySym lang => BodySym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Body (LoggingFor lang) Source # Methods body :: [MSBlock (LoggingFor lang)] -> MSBody (LoggingFor lang) Source # addComments :: Label -> MSBody (LoggingFor lang) -> MSBody (LoggingFor lang) Source # | |
bodyStatements :: BodySym r => [MSStatement r] -> MSBody r Source #
class StatementSym r => BlockSym r where Source #
Methods
block :: [MSStatement r] -> MSBlock r Source #
Instances
| BlockSym lang => BlockSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Block (LoggingFor lang) Source # Methods block :: [MSStatement (LoggingFor lang)] -> MSBlock (LoggingFor lang) Source # | |
class TypeSym r where Source #
Methods
referenceType :: VSType r -> VSType r Source #
listType :: VSType r -> VSType r Source #
setType :: VSType r -> VSType r Source #
arrayType :: VSType r -> VSType r Source #
innerType :: VSType r -> VSType r Source #
Instances
| TypeSym lang => TypeSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods bool :: VSType (LoggingFor lang) Source # int :: VSType (LoggingFor lang) Source # float :: VSType (LoggingFor lang) Source # double :: VSType (LoggingFor lang) Source # char :: VSType (LoggingFor lang) Source # string :: VSType (LoggingFor lang) Source # infile :: VSType (LoggingFor lang) Source # outfile :: VSType (LoggingFor lang) Source # referenceType :: VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # listType :: VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # setType :: VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # arrayType :: VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # innerType :: VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # funcType :: [VSType (LoggingFor lang)] -> VSType (LoggingFor lang) -> VSType (LoggingFor lang) Source # void :: VSType (LoggingFor lang) Source # | |
class TypeSym r => OOTypeSym r where Source #
Instances
| OOTypeSym lang => OOTypeSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods obj :: ClassName -> VSType (LoggingFor lang) Source # | |
class TypeSym r => BinderSym r where Source #
Instances
| BinderSym lang => BinderSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods binder :: Label -> VSType (LoggingFor lang) -> VSBinder (LoggingFor lang) Source # | |
class ValueSym r => StatementSym r where Source #
Methods
valStmt :: SValue r -> MSStatement r Source #
emptyStmt :: MSStatement r Source #
multi :: [MSStatement r] -> MSStatement r Source #
Instances
| StatementSym lang => StatementSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Statement (LoggingFor lang) Source # Methods valStmt :: SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # emptyStmt :: MSStatement (LoggingFor lang) Source # multi :: [MSStatement (LoggingFor lang)] -> MSStatement (LoggingFor lang) Source # | |
class (VariableSym r, StatementSym r) => AssignStatement r where Source #
Methods
(&-=) :: SVariable r -> SValue r -> MSStatement r infixl 1 Source #
(&+=) :: SVariable r -> SValue r -> MSStatement r infixl 1 Source #
(&++) :: SVariable r -> MSStatement r infixl 8 Source #
(&--) :: SVariable r -> MSStatement r infixl 8 Source #
Instances
| SharedProg lang => AssignStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods (&-=) :: SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # (&+=) :: SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # (&++) :: SVariable (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # (&--) :: SVariable (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # assign :: SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # | |
(&=) :: AssignStatement r => SVariable r -> SValue r -> MSStatement r infixr 1 Source #
class (VariableSym r, StatementSym r, ScopeSym r) => DeclStatement r where Source #
Methods
varDec :: SVariable r -> r ScopeData -> MSStatement r Source #
Declare a variable without giving it a value.
Not for use with arrays; use arrayDec instead.
varDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r Source #
Declare a variable and give it a value.
Not for use with arrays; use arrayDecDef instead.
listDec :: Integer -> SVariable r -> r ScopeData -> MSStatement r Source #
listDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r Source #
setDec :: SVariable r -> r ScopeData -> MSStatement r Source #
setDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r Source #
arrayDec :: Integer -> SVariable r -> r ScopeData -> MSStatement r Source #
arrayDecDef :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r Source #
constDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r Source #
funcDecDef :: SVariable r -> r ScopeData -> [SVariable r] -> MSBody r -> MSStatement r Source #
Instances
class (DeclStatement r, OOVariableSym r) => OODeclStatement r where Source #
Methods
objDecDef :: SVariable r -> r ScopeData -> SValue r -> MSStatement r Source #
objDecNew :: SVariable r -> r ScopeData -> [SValue r] -> MSStatement r Source #
extObjDecNew :: Library -> SVariable r -> r ScopeData -> [SValue r] -> MSStatement r Source #
Instances
| (DeclStatement (LoggingFor lang), OODeclStatement lang) => OODeclStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods objDecDef :: SVariable (LoggingFor lang) -> LoggingFor lang ScopeData -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # objDecNew :: SVariable (LoggingFor lang) -> LoggingFor lang ScopeData -> [SValue (LoggingFor lang)] -> MSStatement (LoggingFor lang) Source # extObjDecNew :: Library -> SVariable (LoggingFor lang) -> LoggingFor lang ScopeData -> [SValue (LoggingFor lang)] -> MSStatement (LoggingFor lang) Source # | |
objDecNewNoParams :: OODeclStatement r => SVariable r -> r ScopeData -> MSStatement r Source #
extObjDecNewNoParams :: OODeclStatement r => Library -> SVariable r -> r ScopeData -> MSStatement r Source #
class (VariableSym r, StatementSym r) => IOStatement r where Source #
Methods
print :: SValue r -> MSStatement r Source #
printLn :: SValue r -> MSStatement r Source #
printStr :: String -> MSStatement r Source #
printStrLn :: String -> MSStatement r Source #
printFile :: SValue r -> SValue r -> MSStatement r Source #
printFileLn :: SValue r -> SValue r -> MSStatement r Source #
printFileStr :: SValue r -> String -> MSStatement r Source #
printFileStrLn :: SValue r -> String -> MSStatement r Source #
getInput :: SVariable r -> MSStatement r Source #
discardInput :: MSStatement r Source #
getFileInput :: SValue r -> SVariable r -> MSStatement r Source #
discardFileInput :: SValue r -> MSStatement r Source #
openFileR :: SVariable r -> SValue r -> MSStatement r Source #
openFileW :: SVariable r -> SValue r -> MSStatement r Source #
openFileA :: SVariable r -> SValue r -> MSStatement r Source #
closeFile :: SValue r -> MSStatement r Source #
getFileInputLine :: SValue r -> SVariable r -> MSStatement r Source #
discardFileLine :: SValue r -> MSStatement r Source #
getFileInputAll :: SValue r -> SVariable r -> MSStatement r Source #
Instances
class (VariableSym r, StatementSym r) => StringStatement r where Source #
Methods
stringSplit :: Char -> SVariable r -> SValue r -> MSStatement r Source #
stringListVals :: [SVariable r] -> SValue r -> MSStatement r Source #
stringListLists :: [SVariable r] -> SValue r -> MSStatement r Source #
Instances
| SharedProg lang => StringStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods stringSplit :: Char -> SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # stringListVals :: [SVariable (LoggingFor lang)] -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # stringListLists :: [SVariable (LoggingFor lang)] -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # | |
class (VariableSym r, StatementSym r) => FuncAppStatement r where Source #
Instances
| FuncAppStatement lang => FuncAppStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods inOutCall :: InOutCall (LoggingFor lang) Source # extInOutCall :: Library -> InOutCall (LoggingFor lang) Source # | |
class (FuncAppStatement r, OOVariableSym r) => OOFuncAppStatement r where Source #
Methods
selfInOutCall :: InOutCall r Source #
Instances
| OOFuncAppStatement lang => OOFuncAppStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods selfInOutCall :: InOutCall (LoggingFor lang) Source # | |
class StatementSym r => CommentStatement r where Source #
Methods
comment :: String -> MSStatement r Source #
Instances
| CommentStatement lang => CommentStatement (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods comment :: String -> MSStatement (LoggingFor lang) Source # | |
initObserverList :: DeclStatement r => VSType r -> [SValue r] -> r ScopeData -> MSStatement r Source #
addObserver :: (StatementSym r, OOVariableValue r, List r) => SValue r -> MSStatement r Source #
class (BodySym r, VariableSym r) => ControlStatement r where Source #
Methods
break :: MSStatement r Source #
continue :: MSStatement r Source #
returnStmt :: SValue r -> MSStatement r Source #
throw :: Label -> MSStatement r Source #
ifCond :: [(SValue r, MSBody r)] -> MSBody r -> MSStatement r 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, MSBody r)] -> MSBody r -> MSStatement r Source #
ifExists :: SValue r -> MSBody r -> MSBody r -> MSStatement r Source #
for :: MSStatement r -> SValue r -> MSStatement r -> MSBody r -> MSStatement r Source #
forRange :: SVariable r -> SValue r -> SValue r -> SValue r -> MSBody r -> MSStatement r Source #
forEach :: SVariable r -> SValue r -> MSBody r -> MSStatement r Source #
while :: SValue r -> MSBody r -> MSStatement r Source #
Instances
ifNoElse :: ControlStatement r => [(SValue r, MSBody r)] -> MSStatement r Source #
switchAsIf :: (ControlStatement r, Comparison r) => SValue r -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r Source #
class TypeSym r => VariableSym r where Source #
Methods
var :: Label -> VSType r -> SVariable r Source #
An instance- or function-level variable, separate from its instance (i.e. v, not `o.v`)
constant :: Label -> VSType r -> SVariable r Source #
An instance- or function-level constant, separate from its instance (i.e. v, not `o.v`)
extVar :: Library -> Label -> VSType r -> 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
Instances
| VariableSym lang => VariableSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Variable (LoggingFor lang) Source # Methods var :: Label -> VSType (LoggingFor lang) -> SVariable (LoggingFor lang) Source # constant :: Label -> VSType (LoggingFor lang) -> SVariable (LoggingFor lang) Source # extVar :: Library -> Label -> VSType (LoggingFor lang) -> SVariable (LoggingFor lang) Source # | |
class ScopeSym r where Source #
Instances
| ScopeSym lang => ScopeSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods global :: LoggingFor lang ScopeData Source # mainFn :: LoggingFor lang ScopeData Source # local :: LoggingFor lang ScopeData Source # | |
class (VariableSym r, OOTypeSym r) => OOVariableSym r where Source #
Methods
classVar :: Label -> VSType r -> SVariable r Source #
A class-level variable, separate from its class (i.e. v, not v)
classConst :: Label -> VSType r -> SVariable r Source #
A class-level constant, separate from its class (i.e. v, not v)
classVarAccess :: VSType r -> SVariable r -> SVariable r Source #
Given a class C and a class-level variable v, creates v
extClassVarAccess :: VSType r -> SVariable r -> SVariable r Source #
Given a class C from an external module and a class-level variable v,
performs any necessary imports and creates v
instanceVarAccess :: SValue r -> SVariable r -> SVariable r Source #
Given an instance i and an instance-level variable v, creates `i.v`
Instances
| OOVariableSym lang => OOVariableSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods classVar :: Label -> VSType (LoggingFor lang) -> SVariable (LoggingFor lang) Source # classConst :: Label -> VSType (LoggingFor lang) -> SVariable (LoggingFor lang) Source # classVarAccess :: VSType (LoggingFor lang) -> SVariable (LoggingFor lang) -> SVariable (LoggingFor lang) Source # extClassVarAccess :: VSType (LoggingFor lang) -> SVariable (LoggingFor lang) -> SVariable (LoggingFor lang) Source # instanceVarAccess :: SValue (LoggingFor lang) -> SVariable (LoggingFor lang) -> SVariable (LoggingFor lang) Source # | |
class OOVariableSym r => SelfSym r where Source #
Instances
| SelfSym lang => SelfSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods self :: SVariable (LoggingFor lang) Source # | |
instanceVarSelf :: (SelfSym r, VariableValue r) => SVariable r -> SVariable r Source #
Given a variable v, creates `self.v`
class VariableSym r => VariableElim r where Source #
Methods
variableName :: r (Variable r) -> String Source #
variableType :: r (Variable r) -> r TypeData Source #
Instances
| VariableElim lang => VariableElim (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods variableName :: LoggingFor lang (Variable (LoggingFor lang)) -> String Source # variableType :: LoggingFor lang (Variable (LoggingFor lang)) -> LoggingFor lang TypeData Source # | |
class TypeSym r => ValueSym r where Source #
Instances
| ValueSym lang => ValueSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Value (LoggingFor lang) Source # Methods valueType :: LoggingFor lang (Value (LoggingFor lang)) -> LoggingFor lang TypeData Source # | |
class ValueSym r => Argument r where Source #
Methods
pointerArg :: SValue r -> SValue r Source #
Instances
| Argument lang => Argument (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods pointerArg :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
class ValueSym r => Literal r where Source #
Methods
litChar :: Char -> SValue r Source #
litDouble :: Double -> SValue r Source #
litFloat :: Float -> SValue r Source #
litInt :: Integer -> SValue r Source #
litString :: String -> SValue r Source #
litArray :: VSType r -> [SValue r] -> SValue r Source #
Instances
| Literal lang => Literal (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods litTrue :: SValue (LoggingFor lang) Source # litFalse :: SValue (LoggingFor lang) Source # litChar :: Char -> SValue (LoggingFor lang) Source # litDouble :: Double -> SValue (LoggingFor lang) Source # litFloat :: Float -> SValue (LoggingFor lang) Source # litInt :: Integer -> SValue (LoggingFor lang) Source # litString :: String -> SValue (LoggingFor lang) Source # litArray :: VSType (LoggingFor lang) -> [SValue (LoggingFor lang)] -> SValue (LoggingFor lang) Source # litList :: VSType (LoggingFor lang) -> [SValue (LoggingFor lang)] -> SValue (LoggingFor lang) Source # litSet :: VSType (LoggingFor lang) -> [SValue (LoggingFor lang)] -> SValue (LoggingFor lang) Source # | |
class ValueSym r => MathConstant r where Source #
Instances
| MathConstant lang => MathConstant (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods pi :: SValue (LoggingFor lang) Source # | |
class (VariableSym r, ValueSym r) => VariableValue r where Source #
Instances
| VariableValue lang => VariableValue (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods valueOf :: SVariable (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
class (VariableValue r, OOVariableSym r, SelfSym r) => OOVariableValue r Source #
Instances
| OOVariableValue lang => OOVariableValue (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor | |
class ValueSym r => CommandLineArgs r where Source #
Instances
| CommandLineArgs lang => CommandLineArgs (LoggingFor lang) Source # | |
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 #
Instances
class ValueSym r => BooleanExpression r where Source #
Methods
(?!) :: SValue r -> SValue r infixr 6 Source #
Instances
| BooleanExpression lang => BooleanExpression (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods (?!) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?&&) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?||) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) 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 #
Instances
| Comparison lang => Comparison (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods (?<) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?<=) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?>) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?>=) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?==) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # (?!=) :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) 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 #
Instances
| ValueExpression lang => ValueExpression (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods inlineIf :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # funcAppMixedArgs :: MixedCall (LoggingFor lang) Source # extFuncAppMixedArgs :: Library -> MixedCall (LoggingFor lang) Source # libFuncAppMixedArgs :: Library -> MixedCall (LoggingFor lang) Source # lambda :: [VSBinder (LoggingFor lang)] -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # notNull :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
class (ValueExpression r, OOVariableSym r, OOValueSym r) => OOValueExpression r where Source #
Methods
newObjMixedArgs :: MixedCtorCall r Source #
extNewObjMixedArgs :: Library -> MixedCtorCall r Source #
libNewObjMixedArgs :: Library -> MixedCtorCall r Source #
Instances
| OOValueExpression lang => OOValueExpression (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods newObjMixedArgs :: MixedCtorCall (LoggingFor lang) Source # extNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor lang) Source # libNewObjMixedArgs :: Library -> MixedCtorCall (LoggingFor lang) Source # | |
funcApp :: ValueExpression r => PosCall r Source #
funcAppNamedArgs :: ValueExpression r => Label -> VSType r -> NamedArgs r -> SValue r Source #
selfMethodCall :: (InternalValueExp r, VariableValue r, SelfSym r) => PosCall r Source #
extFuncApp :: ValueExpression r => Library -> PosCall r Source #
libFuncApp :: ValueExpression r => Library -> PosCall r Source #
newObj :: OOValueExpression r => PosCtorCall r Source #
extNewObj :: OOValueExpression r => Library -> PosCtorCall r Source #
libNewObj :: OOValueExpression r => Library -> PosCtorCall r Source #
objMethodCall :: InternalValueExp r => VSType r -> SValue r -> Label -> [SValue r] -> SValue r Source #
Calling a method. t is the return type of the method, o is the object, f is the method name, and ps is a list of positional arguments.
objMethodCallNamedArgs :: InternalValueExp r => VSType r -> SValue r -> Label -> NamedArgs r -> SValue r Source #
Calling a method with named arguments.
objMethodCallMixedArgs :: InternalValueExp r => VSType r -> SValue r -> Label -> [SValue r] -> NamedArgs r -> SValue r Source #
Calling a method with a mix of positional and named arguments.
objMethodCallNoParams :: InternalValueExp r => VSType r -> SValue r -> Label -> SValue r Source #
Calling a method with no parameters.
classMethodCall :: InternalValueExp r => VSType r -> VSType r -> Label -> [SValue r] -> SValue r Source #
Calling a class method. t is the return type of the method, c is the class, f is the method name, and ps is a list of positional arguments.
classMethodCallNamedArgs :: InternalValueExp r => VSType r -> VSType r -> Label -> NamedArgs r -> SValue r Source #
Calling a class method with named arguments.
classMethodCallMixedArgs :: InternalValueExp r => VSType r -> VSType r -> Label -> [SValue r] -> NamedArgs r -> SValue r Source #
Calling a class method with a mix of positional and named arguments.
classMethodCallNoParams :: InternalValueExp r => VSType r -> VSType r -> Label -> SValue r Source #
Calling a class method with no parameters.
class ValueSym r => FunctionSym r Source #
Instances
| FunctionSym lang => FunctionSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Function (LoggingFor lang) Source # | |
class FunctionSym r => OOFunctionSym r where Source #
Instances
| OOFunctionSym lang => OOFunctionSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods func :: Label -> VSType (LoggingFor lang) -> [SValue (LoggingFor lang)] -> VSFunction (LoggingFor lang) Source # objAccess :: SValue (LoggingFor lang) -> VSFunction (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
($.) :: OOFunctionSym r => SValue r -> VSFunction r -> SValue r infixl 9 Source #
selfAccess :: (OOVariableValue r, OOFunctionSym r) => VSFunction r -> SValue r Source #
class (ValueSym r, VariableSym r) => GetSet r where Source #
Methods
get :: SValue r -> SVariable r -> SValue r Source #
set :: SValue r -> SVariable r -> SValue r -> SValue r Source #
Instances
| GetSet lang => GetSet (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods get :: SValue (LoggingFor lang) -> SVariable (LoggingFor lang) -> SValue (LoggingFor lang) Source # set :: SValue (LoggingFor lang) -> SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
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
| Reference lang => Reference (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods makeRef :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # maybeDeref :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
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
Instances
| Array lang => Array (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods arrayElem :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SVariable (LoggingFor lang) Source # arrayLength :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # arrayCopy :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
class IndexTranslator r => List r where Source #
Methods
listSize :: SValue r -> SValue r Source #
listAdd :: SValue r -> SValue r -> SValue r -> MSStatement r Source #
Inserts a value into a list. Arguments are: List, Index, Value
listAppend :: SValue r -> SValue r -> MSStatement r 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 -> MSStatement r 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
Instances
| List lang => List (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods listSize :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # listAdd :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # listAppend :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # listAccess :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # listSet :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # indexOf :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
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
Instances
| Set lang => Set (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods contains :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # setAdd :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # setRemove :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # setUnion :: SValue (LoggingFor lang) -> SValue (LoggingFor lang) -> SValue (LoggingFor lang) Source # | |
listSlice :: InternalList r => SVariable r -> SValue r -> Maybe (SValue r) -> Maybe (SValue r) -> Maybe (SValue r) -> MSBlock r 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, Comparison r) => SValue r -> SValue r -> SValue r Source #
class (StatementSym r, OOFunctionSym r) => ObserverPattern r where Source #
Methods
notifyObservers :: VSFunction r -> VSType r -> MSStatement r Source #
Instances
| ObserverPattern lang => ObserverPattern (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods notifyObservers :: VSFunction (LoggingFor lang) -> VSType (LoggingFor lang) -> MSStatement (LoggingFor lang) Source # | |
class (BodySym r, VariableSym r) => StrategyPattern r where Source #
Methods
runStrategy :: Label -> [(Label, MSBody r)] -> Maybe (SValue r) -> Maybe (SVariable r) -> MSBlock r Source #
Instances
| StrategyPattern lang => StrategyPattern (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods runStrategy :: Label -> [(Label, MSBody (LoggingFor lang))] -> Maybe (SValue (LoggingFor lang)) -> Maybe (SVariable (LoggingFor lang)) -> MSBlock (LoggingFor lang) Source # | |
class VisibilitySym r where Source #
Associated Types
type Visibility r Source #
Instances
| VisibilitySym lang => VisibilitySym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Visibility (LoggingFor lang) Source # Methods private :: LoggingFor lang (Visibility (LoggingFor lang)) Source # public :: LoggingFor lang (Visibility (LoggingFor lang)) Source # | |
class VariableSym r => ParameterSym r where Source #
Methods
param :: SVariable r -> MSParameter r Source #
pointerParam :: SVariable r -> MSParameter r Source #
Instances
| ParameterSym lang => ParameterSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Parameter (LoggingFor lang) Source # Methods param :: SVariable (LoggingFor lang) -> MSParameter (LoggingFor lang) Source # pointerParam :: SVariable (LoggingFor lang) -> MSParameter (LoggingFor lang) Source # | |
class (BodySym r, ParameterSym r, VisibilitySym r) => MethodSym r where Source #
Methods
docMain :: MSBody r -> SMethod r Source #
function :: Label -> r (Visibility r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #
mainFunction :: MSBody r -> SMethod r Source #
docFunc :: String -> [String] -> Maybe String -> SMethod r -> SMethod r Source #
inOutFunc :: Label -> r (Visibility r) -> InOutFunc r Source #
docInOutFunc :: Label -> r (Visibility r) -> DocInOutFunc r Source #
Instances
| MethodSym lang => MethodSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Method (LoggingFor lang) Source # Methods docMain :: MSBody (LoggingFor lang) -> SMethod (LoggingFor lang) Source # function :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> VSType (LoggingFor lang) -> [MSParameter (LoggingFor lang)] -> MSBody (LoggingFor lang) -> SMethod (LoggingFor lang) Source # mainFunction :: MSBody (LoggingFor lang) -> SMethod (LoggingFor lang) Source # docFunc :: String -> [String] -> Maybe String -> SMethod (LoggingFor lang) -> SMethod (LoggingFor lang) Source # inOutFunc :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> InOutFunc (LoggingFor lang) Source # docInOutFunc :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> DocInOutFunc (LoggingFor lang) Source # | |
class (MethodSym r, AttachmentSym r) => OOMethodSym r where Source #
Methods
method :: Label -> r (Visibility r) -> r (Attachment r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #
getMethod :: SVariable r -> SMethod r Source #
setMethod :: SVariable r -> SMethod r Source #
constructor :: [MSParameter r] -> Initializers r -> MSBody r -> SMethod r Source #
inOutMethod :: Label -> r (Visibility r) -> r (Attachment r) -> InOutFunc r Source #
docInOutMethod :: Label -> r (Visibility r) -> r (Attachment r) -> DocInOutFunc r Source #
Instances
| OOMethodSym lang => OOMethodSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Methods method :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> LoggingFor lang (Attachment (LoggingFor lang)) -> VSType (LoggingFor lang) -> [MSParameter (LoggingFor lang)] -> MSBody (LoggingFor lang) -> SMethod (LoggingFor lang) Source # getMethod :: SVariable (LoggingFor lang) -> SMethod (LoggingFor lang) Source # setMethod :: SVariable (LoggingFor lang) -> SMethod (LoggingFor lang) Source # constructor :: [MSParameter (LoggingFor lang)] -> Initializers (LoggingFor lang) -> MSBody (LoggingFor lang) -> SMethod (LoggingFor lang) Source # inOutMethod :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> LoggingFor lang (Attachment (LoggingFor lang)) -> InOutFunc (LoggingFor lang) Source # docInOutMethod :: Label -> LoggingFor lang (Visibility (LoggingFor lang)) -> LoggingFor lang (Attachment (LoggingFor lang)) -> DocInOutFunc (LoggingFor lang) Source # | |
privMethod :: OOMethodSym r => Label -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #
pubMethod :: OOMethodSym r => Label -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #
initializer :: OOMethodSym r => [MSParameter r] -> Initializers r -> SMethod r Source #
nonInitConstructor :: OOMethodSym r => [MSParameter r] -> MSBody r -> SMethod r Source #
class (VisibilitySym r, AttachmentSym r, VariableSym r) => StateVarSym r where Source #
Methods
stateVar :: r (Visibility r) -> r (Attachment r) -> SVariable r -> CSStateVar r Source #
stateVarDef :: r (Visibility r) -> r (Attachment r) -> SVariable r -> SValue r -> CSStateVar r Source #
constVar :: r (Visibility r) -> SVariable r -> SValue r -> CSStateVar r Source #
Instances
| StateVarSym lang => StateVarSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type StateVar (LoggingFor lang) Source # Methods stateVar :: LoggingFor lang (Visibility (LoggingFor lang)) -> LoggingFor lang (Attachment (LoggingFor lang)) -> SVariable (LoggingFor lang) -> CSStateVar (LoggingFor lang) Source # stateVarDef :: LoggingFor lang (Visibility (LoggingFor lang)) -> LoggingFor lang (Attachment (LoggingFor lang)) -> SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> CSStateVar (LoggingFor lang) Source # constVar :: LoggingFor lang (Visibility (LoggingFor lang)) -> SVariable (LoggingFor lang) -> SValue (LoggingFor lang) -> CSStateVar (LoggingFor lang) Source # | |
privDVar :: StateVarSym r => SVariable r -> CSStateVar r Source #
pubDVar :: StateVarSym r => SVariable r -> CSStateVar r Source #
pubSVar :: StateVarSym r => SVariable r -> CSStateVar r Source #
class (OOMethodSym r, StateVarSym r) => ClassSym r where Source #
Methods
buildClass :: Maybe Label -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r Source #
Main external method for creating a class. Inputs: parent class, variables, constructor(s), methods
extraClass :: Label -> Maybe Label -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r Source #
Creates an extra class. Inputs: class name, the rest are the same as buildClass.
implementingClass :: Label -> [Label] -> [CSStateVar r] -> [SMethod r] -> [SMethod r] -> SClass r Source #
Creates a class implementing interfaces. Inputs: class name, interface names, variables, constructor(s), methods
Instances
| ClassSym lang => ClassSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Class (LoggingFor lang) Source # Methods buildClass :: Maybe Label -> [CSStateVar (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> SClass (LoggingFor lang) Source # extraClass :: Label -> Maybe Label -> [CSStateVar (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> SClass (LoggingFor lang) Source # implementingClass :: Label -> [Label] -> [CSStateVar (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> [SMethod (LoggingFor lang)] -> SClass (LoggingFor lang) Source # docClass :: String -> SClass (LoggingFor lang) -> SClass (LoggingFor lang) Source # | |
class ClassSym r => ModuleSym r where Source #
Instances
| ModuleSym lang => ModuleSym (LoggingFor lang) Source # | |
Defined in Drasil.Shared.LanguageRenderer.LoggingFor Associated Types type Module (LoggingFor lang) Source # Methods buildModule :: Label -> [Label] -> [SMethod (LoggingFor lang)] -> [SClass (LoggingFor lang)] -> FSModule (LoggingFor lang) 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 (lang :: Type -> Type) a Source #
Instances
getCodeType :: UnRepr r TypeData => r TypeData -> CodeType Source #
A helper function for extracting the CodeType from an `r TypeData`
getTypeString :: UnRepr r TypeData => r TypeData -> String Source #
A helper function for extracting the String representation from an `r TypeData`