Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
re-export smart constructors for external code writing
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 (ProgramSym r, VectorType r, VectorDecl r, VectorThunk r, VectorExpression r, ThunkAssign r, AssignStatement r, DeclStatement r, IOStatement r, StringStatement 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, InternalValueExp r, GetSet r, List r, StatePattern r, ObserverPattern r, StrategyPattern r, TypeElim r, VariableElim r) => OOProg r Source #
Instances
OOProg CodeInfo Source # | |
Defined in GOOL.Drasil.CodeInfo | |
OOProg CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer | |
OOProg JavaCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.JavaRenderer | |
OOProg PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer | |
OOProg SwiftCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.SwiftRenderer | |
Pair p => OOProg (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer |
class FileSym r => ProgramSym r where Source #
Instances
ProgramSym CodeInfo Source # | |
ProgramSym CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer type Program CSharpCode Source # prog :: Label -> Label -> [SFile CSharpCode] -> GSProgram CSharpCode Source # | |
ProgramSym CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer type Program CppSrcCode Source # prog :: Label -> Label -> [SFile CppSrcCode] -> GSProgram CppSrcCode Source # | |
ProgramSym JavaCode Source # | |
ProgramSym PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer type Program PythonCode Source # prog :: Label -> Label -> [SFile PythonCode] -> GSProgram PythonCode Source # | |
ProgramSym SwiftCode Source # | |
Pair p => ProgramSym (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer type Program (p CppSrcCode CppHdrCode) Source # prog :: Label -> Label -> [SFile (p CppSrcCode CppHdrCode)] -> GSProgram (p CppSrcCode CppHdrCode) Source # |
class ModuleSym r => FileSym r where Source #
fileDoc :: FSModule r -> SFile r Source #
docMod :: String -> [String] -> String -> SFile r -> SFile r Source #
Instances
class PermanenceSym r where Source #
type Permanence r Source #
static :: r (Permanence r) Source #
dynamic :: r (Permanence r) Source #
Instances
class BlockSym r => BodySym r where Source #
Instances
bodyStatements :: BodySym r => [MSStatement r] -> MSBody r Source #
class StatementSym r => BlockSym r where Source #
block :: [MSStatement r] -> MSBlock r Source #
Instances
class TypeSym r where Source #
listType :: VSType r -> VSType r Source #
arrayType :: VSType r -> VSType r Source #
listInnerType :: VSType r -> VSType r Source #
obj :: ClassName -> VSType r Source #
Instances
class TypeSym r => TypeElim r where Source #
Instances
Instances
ThunkSym CodeInfo Source # | |
Defined in GOOL.Drasil.CodeInfo | |
ThunkSym CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer type Thunk CSharpCode Source # | |
ThunkSym CppHdrCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer type Thunk CppHdrCode Source # | |
ThunkSym CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer type Thunk CppSrcCode Source # | |
ThunkSym JavaCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.JavaRenderer | |
ThunkSym PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer type Thunk PythonCode Source # | |
ThunkSym SwiftCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.SwiftRenderer | |
ThunkSym (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer type Thunk (p CppSrcCode CppHdrCode) Source # |
class TypeSym r => VectorType r where Source #
Instances
VectorType CodeInfo Source # | |
VectorType CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer vecType :: VSType CSharpCode -> VSType CSharpCode Source # | |
VectorType CppHdrCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer vecType :: VSType CppHdrCode -> VSType CppHdrCode Source # | |
VectorType CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer vecType :: VSType CppSrcCode -> VSType CppSrcCode Source # | |
VectorType JavaCode Source # | |
VectorType PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer vecType :: VSType PythonCode -> VSType PythonCode Source # | |
VectorType SwiftCode Source # | |
Pair p => VectorType (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer vecType :: VSType (p CppSrcCode CppHdrCode) -> VSType (p CppSrcCode CppHdrCode) Source # |
class (VariableSym r, StatementSym r) => VectorDecl r where Source #
vecDec :: Integer -> SVariable r -> MSStatement r Source #
vecDecDef :: SVariable r -> [SValue r] -> MSStatement r Source #
Instances
class (VariableSym r, ThunkSym r) => VectorThunk r where Source #
Instances
class (ThunkSym r, ValueSym r) => VectorExpression r where Source #
vecScale :: SValue r -> VSThunk r -> VSThunk r Source #
vecAdd :: VSThunk r -> VSThunk r -> VSThunk r Source #
Instances
class (VariableSym r, ThunkSym r, StatementSym r) => ThunkAssign r where Source #
thunkAssign :: SVariable r -> VSThunk r -> MSStatement r Source #
Instances
ThunkAssign CodeInfo Source # | |
Defined in GOOL.Drasil.CodeInfo | |
ThunkAssign CSharpCode Source # | |
ThunkAssign CppHdrCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer | |
ThunkAssign CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer | |
ThunkAssign JavaCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.JavaRenderer | |
ThunkAssign PythonCode Source # | |
ThunkAssign SwiftCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.SwiftRenderer | |
Pair p => ThunkAssign (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer thunkAssign :: SVariable (p CppSrcCode CppHdrCode) -> VSThunk (p CppSrcCode CppHdrCode) -> MSStatement (p CppSrcCode CppHdrCode) Source # |
class ValueSym r => StatementSym r where Source #
valStmt :: SValue r -> MSStatement r Source #
multi :: [MSStatement r] -> MSStatement r Source #
Instances
class (VariableSym r, StatementSym r) => AssignStatement r where Source #
(&-=) :: 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
(&=) :: AssignStatement r => SVariable r -> SValue r -> MSStatement r infixr 1 Source #
assignToListIndex :: (StatementSym r, VariableValue r, List r) => SVariable r -> SValue r -> SValue r -> MSStatement r Source #
class (VariableSym r, StatementSym r) => DeclStatement r where Source #
varDec :: SVariable r -> MSStatement r Source #
varDecDef :: SVariable r -> SValue r -> MSStatement r Source #
listDec :: Integer -> SVariable r -> MSStatement r Source #
listDecDef :: SVariable r -> [SValue r] -> MSStatement r Source #
arrayDec :: Integer -> SVariable r -> MSStatement r Source #
arrayDecDef :: SVariable r -> [SValue r] -> MSStatement r Source #
objDecDef :: SVariable r -> SValue r -> MSStatement r Source #
objDecNew :: SVariable r -> [SValue r] -> MSStatement r Source #
extObjDecNew :: Library -> SVariable r -> [SValue r] -> MSStatement r Source #
constDecDef :: SVariable r -> SValue r -> MSStatement r Source #
funcDecDef :: SVariable r -> [SVariable r] -> MSBody r -> MSStatement r Source #
Instances
objDecNewNoParams :: DeclStatement r => SVariable r -> MSStatement r Source #
extObjDecNewNoParams :: DeclStatement r => Library -> SVariable r -> MSStatement r Source #
class (VariableSym r, StatementSym r) => IOStatement r where Source #
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 #
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
class (VariableSym r, StatementSym r) => FuncAppStatement r where Source #
inOutCall :: InOutCall r Source #
selfInOutCall :: InOutCall r Source #
extInOutCall :: Library -> InOutCall r Source #
Instances
class StatementSym r => CommentStatement r where Source #
comment :: Comment -> MSStatement r Source #
Instances
initState :: (DeclStatement r, Literal r) => Label -> Label -> MSStatement r Source #
changeState :: (AssignStatement r, Literal r) => Label -> Label -> MSStatement r Source #
initObserverList :: DeclStatement r => VSType r -> [SValue r] -> MSStatement r Source #
addObserver :: (StatementSym r, VariableValue r, List r) => SValue r -> MSStatement r Source #
class (BodySym r, VariableSym r) => ControlStatement r where Source #
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 #
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 #
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 #
var :: Label -> VSType r -> SVariable r Source #
staticVar :: Label -> VSType r -> SVariable r Source #
constant :: Label -> VSType r -> SVariable r Source #
extVar :: Library -> Label -> VSType r -> SVariable r Source #
classVar :: VSType r -> SVariable r -> SVariable r Source #
extClassVar :: VSType r -> SVariable r -> SVariable r Source #
objVar :: SVariable r -> SVariable r -> SVariable r Source #
objVarSelf :: SVariable r -> SVariable r Source #
Instances
class VariableSym r => VariableElim r where Source #
variableName :: r (Variable r) -> String Source #
variableType :: r (Variable r) -> r (Type r) Source #
Instances
class TypeSym r => ValueSym r where Source #
Instances
class ValueSym r => Argument r where Source #
pointerArg :: SValue r -> SValue r Source #
Instances
Argument CodeInfo Source # | |
Defined in GOOL.Drasil.CodeInfo | |
Argument CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer | |
Argument CppHdrCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer | |
Argument CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer | |
Argument JavaCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.JavaRenderer | |
Argument PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer | |
Argument SwiftCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.SwiftRenderer | |
Pair p => Argument (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer pointerArg :: SValue (p CppSrcCode CppHdrCode) -> SValue (p CppSrcCode CppHdrCode) Source # |
class ValueSym r => Literal r where Source #
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 #
Instances
class ValueSym r => MathConstant r where Source #
Instances
MathConstant CodeInfo Source # | |
MathConstant CSharpCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CSharpRenderer pi :: SValue CSharpCode Source # | |
MathConstant CppHdrCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer pi :: SValue CppHdrCode Source # | |
MathConstant CppSrcCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer pi :: SValue CppSrcCode Source # | |
MathConstant JavaCode Source # | |
MathConstant PythonCode Source # | |
Defined in GOOL.Drasil.LanguageRenderer.PythonRenderer pi :: SValue PythonCode Source # | |
MathConstant SwiftCode Source # | |
Pair p => MathConstant (p CppSrcCode CppHdrCode) Source # | |
Defined in GOOL.Drasil.LanguageRenderer.CppRenderer pi :: SValue (p CppSrcCode CppHdrCode) Source # |
class (VariableSym r, ValueSym r) => VariableValue r where Source #
Instances
class ValueSym r => CommandLineArgs r where Source #
Instances
class ValueSym r => NumericExpression r where Source #
(#~) :: 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 #
(?!) :: SValue r -> SValue r infixr 6 Source #
Instances
class ValueSym r => Comparison r where Source #
(?<) :: SValue r -> SValue r -> SValue r infixl 4 Source #
(?<=) :: SValue r -> SValue r -> SValue r infixl 4 Source #
(?>) :: SValue r -> SValue r -> SValue r infixl 4 Source #
(?>=) :: SValue r -> SValue r -> SValue r infixl 4 Source #
Instances
class (VariableSym r, ValueSym r) => ValueExpression r where Source #
inlineIf :: SValue r -> SValue r -> SValue r -> SValue r Source #
funcAppMixedArgs :: MixedCall r Source #
selfFuncAppMixedArgs :: MixedCall r Source #
extFuncAppMixedArgs :: Library -> MixedCall r Source #
libFuncAppMixedArgs :: Library -> MixedCall r Source #
newObjMixedArgs :: MixedCtorCall r Source #
extNewObjMixedArgs :: Library -> MixedCtorCall r Source #
libNewObjMixedArgs :: Library -> MixedCtorCall r Source #
Instances
funcApp :: ValueExpression r => PosCall r Source #
funcAppNamedArgs :: ValueExpression r => Label -> VSType r -> NamedArgs r -> SValue r Source #
selfFuncApp :: ValueExpression r => PosCall r Source #
extFuncApp :: ValueExpression r => Library -> PosCall r Source #
libFuncApp :: ValueExpression r => Library -> PosCall r Source #
newObj :: ValueExpression r => PosCtorCall r Source #
extNewObj :: ValueExpression r => Library -> PosCtorCall r Source #
libNewObj :: ValueExpression r => Library -> PosCtorCall r Source #
objMethodCallMixedArgs :: InternalValueExp r => VSType r -> SValue r -> Label -> [SValue r] -> NamedArgs r -> SValue r Source #
class ValueSym r => FunctionSym r where Source #
Instances
($.) :: FunctionSym r => SValue r -> VSFunction r -> SValue r infixl 9 Source #
selfAccess :: (VariableValue r, FunctionSym r) => VSFunction r -> SValue r Source #
class (ValueSym r, VariableSym r) => GetSet r where Source #
get :: SValue r -> SVariable r -> SValue r Source #
set :: SValue r -> SVariable r -> SValue r -> SValue r Source #
Instances
class ValueSym r => List r where Source #
listSize :: SValue r -> SValue r Source #
listAdd :: SValue r -> SValue r -> SValue r -> SValue r Source #
listAppend :: SValue r -> SValue r -> SValue r Source #
listAccess :: SValue r -> SValue r -> SValue r Source #
listSet :: SValue r -> SValue r -> SValue r -> SValue r Source #
Instances
listSlice :: InternalList r => SVariable r -> SValue r -> Maybe (SValue r) -> Maybe (SValue r) -> Maybe (SValue r) -> MSBlock r Source #
listIndexExists :: (List r, Comparison r) => SValue r -> SValue r -> SValue r Source #
class BodySym r => StatePattern r where Source #
checkState :: Label -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r Source #
Instances
class (StatementSym r, FunctionSym r) => ObserverPattern r where Source #
notifyObservers :: VSFunction r -> VSType r -> MSStatement r Source #
Instances
class (BodySym r, VariableSym r) => StrategyPattern r where Source #
runStrategy :: Label -> [(Label, MSBody r)] -> Maybe (SValue r) -> Maybe (SVariable r) -> MSBlock r Source #
Instances
class ScopeSym r where Source #
Instances
class VariableSym r => ParameterSym r where Source #
param :: SVariable r -> MSParameter r Source #
pointerParam :: SVariable r -> MSParameter r Source #
Instances
class (BodySym r, ParameterSym r, ScopeSym r, PermanenceSym r) => MethodSym r where Source #
method :: Label -> r (Scope r) -> r (Permanence 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 #
docMain :: MSBody r -> SMethod r Source #
function :: Label -> r (Scope 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 #
inOutMethod :: Label -> r (Scope r) -> r (Permanence r) -> InOutFunc r Source #
docInOutMethod :: Label -> r (Scope r) -> r (Permanence r) -> DocInOutFunc r Source #
inOutFunc :: Label -> r (Scope r) -> InOutFunc r Source #
docInOutFunc :: Label -> r (Scope r) -> DocInOutFunc r Source #
Instances
privMethod :: MethodSym r => Label -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #
initializer :: MethodSym r => [MSParameter r] -> Initializers r -> SMethod r Source #
nonInitConstructor :: MethodSym r => [MSParameter r] -> MSBody r -> SMethod r Source #
class (ScopeSym r, PermanenceSym r, VariableSym r) => StateVarSym r where Source #
stateVar :: r (Scope r) -> r (Permanence r) -> SVariable r -> CSStateVar r Source #
stateVarDef :: r (Scope r) -> r (Permanence r) -> SVariable r -> SValue r -> CSStateVar r Source #
constVar :: r (Scope r) -> SVariable r -> SValue r -> CSStateVar r Source #
Instances
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 (MethodSym r, StateVarSym r) => ClassSym r where Source #
buildClass :: Maybe Label -> [CSStateVar r] -> [SMethod r] -> SClass r Source #
extraClass :: Label -> Maybe Label -> [CSStateVar r] -> [SMethod r] -> SClass r Source #
implementingClass :: Label -> [Label] -> [CSStateVar r] -> [SMethod r] -> SClass r Source #
Instances
class ClassSym r => ModuleSym r where Source #
Instances
GS | |
|
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 #
unPC :: PythonCode a -> a Source #
unCSC :: CSharpCode a -> a Source #
unCPPC :: CppCode CppSrcCode CppHdrCode a -> a Source #
cppVersion :: String Source #