| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.Shared.LanguageRenderer.CommonPseudoOO
Description
Implementations defined here are valid in some, but not all, language renderers
Synopsis
- int :: Monad r => VS (r TypeData)
- constructor :: (OORenderSym r vis smt md svr att, OOStatement r smt) => Label -> [MS (r ParamData)] -> Initializers r -> MS (r Body) -> MS (r md)
- doxFunc :: RenderMethod r md => String -> [String] -> Maybe String -> MS (r md) -> MS (r md)
- doxClass :: RenderClass r vis md svr => String -> CS (r Class) -> CS (r Class)
- doxMod :: RenderFile r => String -> String -> String -> [String] -> String -> FS (r File) -> FS (r File)
- modDoc' :: ModuleDocRenderer
- functionDoc :: FuncDocRenderer
- extVar :: VariableSym r => Library -> Label -> VS (r TypeData) -> SVariable r
- classVarAccess :: (InternalVarElim r, RenderVariable r, UnRepr r TypeData, VariableElim r) => (Doc -> Doc -> Doc) -> VS (r TypeData) -> SVariable r -> SVariable r
- indexOf :: (IndexTranslator r, OOFunctionSym r) => Label -> SValue r -> SValue r -> SValue r
- contains :: OOFunctionSym r => Label -> SValue r -> SValue r -> SValue r
- containsInt :: (Comparison r, OOFunctionSym r) => Label -> Label -> SValue r -> SValue r -> SValue r
- discardFileLine :: (InternalValueExp r, StatementSym r smt) => Label -> SValue r -> MS (r smt)
- intClass :: (MethodElim r md, Monad r, StateVarElim r svr, VisibilityElim r vis) => (Label -> Doc -> Doc -> Doc -> Doc -> Doc) -> Label -> r vis -> r ParentSpec -> [CSStateVar r svr] -> [MS (r md)] -> [MS (r md)] -> CS (r Doc)
- funcType :: TypeSym r => [VS (r TypeData)] -> VS (r TypeData) -> VS (r TypeData)
- buildModule :: (ClassElim r, MethodElim r md, RenderMod r) => Label -> FS Doc -> FS Doc -> FS Doc -> [MS (r md)] -> [CS (r Class)] -> FS (r Module)
- arrayType :: (TypeElim r, Monad r, UnRepr r TypeData) => VS (r TypeData) -> VS (r TypeData)
- pi :: (RenderValue r, TypeSym r) => SValue r
- printSt :: (RenderStatement r smt, ValueElim r) => SValue r -> SValue r -> MS (r smt)
- arrayDec :: (ScopeElim r, UnRepr r TypeData, InternalVarElim r, RenderStatement r smt, ValueElim r, VariableElim r) => SValue r -> SVariable r -> r ScopeData -> MS (r smt)
- arrayDecDef :: (DeclStatement r smt, RenderStatement r smt, StatementElim r smt, ValueElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt)
- openFileA :: (AssignStatement r smt, Literal r) => (SValue r -> VS (r TypeData) -> SValue r -> SValue r) -> SVariable r -> SValue r -> MS (r smt)
- forEach :: (BodyElim r, InternalVarElim r, RenderStatement r smt, UnRepr r TypeData, ValueElim r, VariableElim r) => Doc -> Doc -> Doc -> Doc -> SVariable r -> SValue r -> MS (r Body) -> MS (r smt)
- docMain :: OORenderSym r vis smt md svr att => MS (r Body) -> MS (r md)
- mainFunction :: (AttachmentSym r att, OORenderMethod r vis md att, ParameterSym r, UnRepr r TypeData, Monad r, VisibilitySym r vis) => VS (r TypeData) -> Label -> MS (r Body) -> MS (r md)
- buildModule' :: (OORenderSym r vis smt md svr att, UnRepr r Doc) => Label -> (String -> r Doc) -> [Label] -> [MS (r md)] -> [CS (r Class)] -> FS (r Module)
- call' :: (InternalVarElim r, RenderValue r, ValueElim r) => String -> Maybe Library -> Maybe Doc -> MixedCall r
- listSizeFunc :: OOFunctionSym r => VS (r FuncData)
- listAccessFunc' :: (OOFunctionSym r, TypeElim r) => Label -> VS (r TypeData) -> SValue r -> VS (r FuncData)
- string :: Monad r => VS (r TypeData)
- docInOutFunc :: RenderMethod r md => ([SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md)) -> String -> [(String, SVariable r)] -> [(String, SVariable r)] -> [(String, SVariable r)] -> MS (r Body) -> MS (r md)
- bindingError :: String -> String
- extFuncAppMixedArgs :: ValueExpression r => Library -> MixedCall r
- notNull :: (Comparison r, VariableValue r) => String -> SValue r -> SValue r
- listDecDef :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt)
- destructorError :: String -> String
- stateVarDef :: (OORenderSym r vis smt md svr att, Monad r) => r vis -> r att -> SVariable r -> SValue r -> CS (r Doc)
- constVar :: (CommonRenderSym r vis smt md, Monad r) => Doc -> r vis -> SVariable r -> SValue r -> CS (r Doc)
- litArray :: (RenderValue r, TypeSym r, ValueElim r) => (Doc -> Doc) -> VS (r TypeData) -> [SValue r] -> SValue r
- litSet :: (RenderValue r, TypeSym r, ValueElim r) => (Doc -> Doc) -> (Doc -> Doc) -> VS (r TypeData) -> [SValue r] -> SValue r
- litSetFunc :: (RenderValue r, TypeSym r, ValueElim r) => String -> VS (r TypeData) -> [SValue r] -> SValue r
- extraClass :: (RenderClass r vis md svr, VisibilitySym r vis) => Label -> Maybe Label -> [CSStateVar r svr] -> [MS (r md)] -> [MS (r md)] -> CS (r Class)
- listAccessFunc :: ValueElim r => r Value -> Doc
- doubleRender :: String
- double :: Monad r => VS (r TypeData)
- openFileR :: AssignStatement r smt => (SValue r -> VS (r TypeData) -> SValue r) -> SVariable r -> SValue r -> MS (r smt)
- openFileW :: (AssignStatement r smt, Literal r) => (SValue r -> VS (r TypeData) -> SValue r -> SValue r) -> SVariable r -> SValue r -> MS (r smt)
- stateVar :: (Monad r, OORenderSym r vis smt md svr att) => r vis -> r att -> SVariable r -> CS (r Doc)
- self :: (OOTypeSym r, RenderVariable r) => SVariable r
- multiAssign :: (AssignStatement r smt, InternalVarElim r, RenderValue r, RenderVariable r, ValueElim r) => (Doc -> Doc) -> [SVariable r] -> [SValue r] -> MS (r smt)
- multiReturn :: (ControlStatement r smt, RenderValue r, ValueElim r) => (Doc -> Doc) -> [SValue r] -> MS (r smt)
- listDec :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> MS (r smt)
- funcDecDef :: OORenderSym r vis smt md svr att => SVariable r -> r ScopeData -> [SVariable r] -> MS (r Body) -> MS (r smt)
- inOutCall :: (InternalAssignStmt r smt, StatementSym r smt, VariableValue r) => (Label -> VS (r TypeData) -> [SValue r] -> SValue r) -> Label -> [SValue r] -> [SVariable r] -> [SVariable r] -> MS (r smt)
- forLoopError :: String -> String
- mainBody :: (BodyElim r, RenderMethod r md) => MS (r Body) -> MS (r md)
- inOutFunc :: (InternalControlStmt r smt, SharedStatement r smt, RenderBody r, RenderType r, VariableElim r) => (VS (r TypeData) -> [MS (r ParamData)] -> MS (r Body) -> MS (r md)) -> [SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md)
- docInOutFunc' :: RenderMethod r md => FuncDocRenderer -> ([SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md)) -> String -> [(String, SVariable r)] -> [(String, SVariable r)] -> [(String, SVariable r)] -> MS (r Body) -> MS (r md)
- bool :: TypeSym r => VS (r TypeData)
- floatRender :: String
- float :: Monad r => VS (r TypeData)
- stringRender' :: String
- string' :: Monad r => VS (r TypeData)
- inherit :: Monad r => Maybe Label -> r ParentSpec
- implements :: Monad r => [Label] -> r ParentSpec
- listSize :: List r smt => SValue r -> SValue r
- listSet :: (AssignStatement r smt, IndexTranslator r, RenderVariable r, ValueElim r) => SValue r -> SValue r -> SValue r -> MS (r smt)
- setDecDef :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt)
- setDec :: (DeclStatement r smt, RenderStatement r smt, StatementElim r smt) => (r Value -> Doc) -> SValue r -> SVariable r -> r ScopeData -> MS (r smt)
- intToIndex :: SValue r -> SValue r
- indexToInt :: SValue r -> SValue r
- intToIndex' :: (Literal r, NumericExpression r, RenderValue r, ValueElim r) => SValue r -> SValue r
- indexToInt' :: (Literal r, NumericExpression r, RenderValue r, ValueElim r) => SValue r -> SValue r
- varDecDef :: DeclStatement r smt => SVariable r -> r ScopeData -> SValue r -> MS (r smt)
- openFileR' :: (Literal r, ValueExpression r) => SValue r -> SValue r
- openFileW' :: (Literal r, ValueExpression r) => SValue r -> SValue r
- openFileA' :: (Literal r, ValueExpression r) => SValue r -> SValue r
- argExists :: SharedStatement r smt => Integer -> SValue r
- global :: Monad r => r ScopeData
- setMethodCall :: InternalValueExp r => Label -> SValue r -> SValue r -> SValue r
Documentation
constructor :: (OORenderSym r vis smt md svr att, OOStatement r smt) => Label -> [MS (r ParamData)] -> Initializers r -> MS (r Body) -> MS (r md) Source #
doxFunc :: RenderMethod r md => String -> [String] -> Maybe String -> MS (r md) -> MS (r md) Source #
doxMod :: RenderFile r => String -> String -> String -> [String] -> String -> FS (r File) -> FS (r File) Source #
modDoc' :: ModuleDocRenderer Source #
Generates Markdown/DocC style module doc comment. Useful for Swift, which follows DocC, Julia, which uses Markdown, and any other language that doesn't have Support for a document generator.
functionDoc :: FuncDocRenderer Source #
Generates Markdown/DocC style function doc comment.
extVar :: VariableSym r => Library -> Label -> VS (r TypeData) -> SVariable r Source #
An instance- or module-level variable from an external library.
Given library Lib, variable name v, and variable type t,
it performs the necessary imports and creates v
classVarAccess :: (InternalVarElim r, RenderVariable r, UnRepr r TypeData, VariableElim r) => (Doc -> Doc -> Doc) -> VS (r TypeData) -> SVariable r -> SVariable r Source #
indexOf :: (IndexTranslator r, OOFunctionSym r) => Label -> SValue r -> SValue r -> SValue r Source #
containsInt :: (Comparison r, OOFunctionSym r) => Label -> Label -> SValue r -> SValue r -> SValue r Source #
discardFileLine :: (InternalValueExp r, StatementSym r smt) => Label -> SValue r -> MS (r smt) Source #
intClass :: (MethodElim r md, Monad r, StateVarElim r svr, VisibilityElim r vis) => (Label -> Doc -> Doc -> Doc -> Doc -> Doc) -> Label -> r vis -> r ParentSpec -> [CSStateVar r svr] -> [MS (r md)] -> [MS (r md)] -> CS (r Doc) Source #
An internal function for creating a class. Parameters: render function, class name, scope, parent, class variables, constructor(s), methods
buildModule :: (ClassElim r, MethodElim r md, RenderMod r) => Label -> FS Doc -> FS Doc -> FS Doc -> [MS (r md)] -> [CS (r Class)] -> FS (r Module) Source #
arrayType :: (TypeElim r, Monad r, UnRepr r TypeData) => VS (r TypeData) -> VS (r TypeData) Source #
arrayDec :: (ScopeElim r, UnRepr r TypeData, InternalVarElim r, RenderStatement r smt, ValueElim r, VariableElim r) => SValue r -> SVariable r -> r ScopeData -> MS (r smt) Source #
arrayDecDef :: (DeclStatement r smt, RenderStatement r smt, StatementElim r smt, ValueElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt) Source #
openFileA :: (AssignStatement r smt, Literal r) => (SValue r -> VS (r TypeData) -> SValue r -> SValue r) -> SVariable r -> SValue r -> MS (r smt) Source #
forEach :: (BodyElim r, InternalVarElim r, RenderStatement r smt, UnRepr r TypeData, ValueElim r, VariableElim r) => Doc -> Doc -> Doc -> Doc -> SVariable r -> SValue r -> MS (r Body) -> MS (r smt) Source #
mainFunction :: (AttachmentSym r att, OORenderMethod r vis md att, ParameterSym r, UnRepr r TypeData, Monad r, VisibilitySym r vis) => VS (r TypeData) -> Label -> MS (r Body) -> MS (r md) Source #
buildModule' :: (OORenderSym r vis smt md svr att, UnRepr r Doc) => Label -> (String -> r Doc) -> [Label] -> [MS (r md)] -> [CS (r Class)] -> FS (r Module) Source #
Used by the language renderers to build the module. n is the module name inc is the include is is the import statements ms is the class methods cs is the classes
call' :: (InternalVarElim r, RenderValue r, ValueElim r) => String -> Maybe Library -> Maybe Doc -> MixedCall r Source #
First parameter is language name, rest similar to call from RendererClassesCommon
listSizeFunc :: OOFunctionSym r => VS (r FuncData) Source #
listAccessFunc' :: (OOFunctionSym r, TypeElim r) => Label -> VS (r TypeData) -> SValue r -> VS (r FuncData) Source #
docInOutFunc :: RenderMethod r md => ([SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md)) -> String -> [(String, SVariable r)] -> [(String, SVariable r)] -> [(String, SVariable r)] -> MS (r Body) -> MS (r md) Source #
bindingError :: String -> String Source #
extFuncAppMixedArgs :: ValueExpression r => Library -> MixedCall r Source #
notNull :: (Comparison r, VariableValue r) => String -> SValue r -> SValue r Source #
listDecDef :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt) Source #
destructorError :: String -> String Source #
stateVarDef :: (OORenderSym r vis smt md svr att, Monad r) => r vis -> r att -> SVariable r -> SValue r -> CS (r Doc) Source #
constVar :: (CommonRenderSym r vis smt md, Monad r) => Doc -> r vis -> SVariable r -> SValue r -> CS (r Doc) Source #
litArray :: (RenderValue r, TypeSym r, ValueElim r) => (Doc -> Doc) -> VS (r TypeData) -> [SValue r] -> SValue r Source #
litSet :: (RenderValue r, TypeSym r, ValueElim r) => (Doc -> Doc) -> (Doc -> Doc) -> VS (r TypeData) -> [SValue r] -> SValue r Source #
litSetFunc :: (RenderValue r, TypeSym r, ValueElim r) => String -> VS (r TypeData) -> [SValue r] -> SValue r Source #
extraClass :: (RenderClass r vis md svr, VisibilitySym r vis) => Label -> Maybe Label -> [CSStateVar r svr] -> [MS (r md)] -> [MS (r md)] -> CS (r Class) Source #
openFileR :: AssignStatement r smt => (SValue r -> VS (r TypeData) -> SValue r) -> SVariable r -> SValue r -> MS (r smt) Source #
openFileW :: (AssignStatement r smt, Literal r) => (SValue r -> VS (r TypeData) -> SValue r -> SValue r) -> SVariable r -> SValue r -> MS (r smt) Source #
stateVar :: (Monad r, OORenderSym r vis smt md svr att) => r vis -> r att -> SVariable r -> CS (r Doc) Source #
multiAssign :: (AssignStatement r smt, InternalVarElim r, RenderValue r, RenderVariable r, ValueElim r) => (Doc -> Doc) -> [SVariable r] -> [SValue r] -> MS (r smt) Source #
multiReturn :: (ControlStatement r smt, RenderValue r, ValueElim r) => (Doc -> Doc) -> [SValue r] -> MS (r smt) Source #
listDec :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> MS (r smt) Source #
funcDecDef :: OORenderSym r vis smt md svr att => SVariable r -> r ScopeData -> [SVariable r] -> MS (r Body) -> MS (r smt) Source #
inOutCall :: (InternalAssignStmt r smt, StatementSym r smt, VariableValue r) => (Label -> VS (r TypeData) -> [SValue r] -> SValue r) -> Label -> [SValue r] -> [SVariable r] -> [SVariable r] -> MS (r smt) Source #
forLoopError :: String -> String Source #
inOutFunc :: (InternalControlStmt r smt, SharedStatement r smt, RenderBody r, RenderType r, VariableElim r) => (VS (r TypeData) -> [MS (r ParamData)] -> MS (r Body) -> MS (r md)) -> [SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md) Source #
docInOutFunc' :: RenderMethod r md => FuncDocRenderer -> ([SVariable r] -> [SVariable r] -> [SVariable r] -> MS (r Body) -> MS (r md)) -> String -> [(String, SVariable r)] -> [(String, SVariable r)] -> [(String, SVariable r)] -> MS (r Body) -> MS (r md) Source #
floatRender :: String Source #
implements :: Monad r => [Label] -> r ParentSpec Source #
listSet :: (AssignStatement r smt, IndexTranslator r, RenderVariable r, ValueElim r) => SValue r -> SValue r -> SValue r -> MS (r smt) Source #
setDecDef :: (DeclStatement r smt, Literal r, VariableElim r) => SVariable r -> r ScopeData -> [SValue r] -> MS (r smt) Source #
setDec :: (DeclStatement r smt, RenderStatement r smt, StatementElim r smt) => (r Value -> Doc) -> SValue r -> SVariable r -> r ScopeData -> MS (r smt) Source #
intToIndex :: SValue r -> SValue r Source #
Convert an integer to an index in a 0-indexed language Since GOOL is 0-indexed, no adjustments need be made
indexToInt :: SValue r -> SValue r Source #
Convert an index to an integer in a 0-indexed language Since GOOL is 0-indexed, no adjustments need be made
intToIndex' :: (Literal r, NumericExpression r, RenderValue r, ValueElim r) => SValue r -> SValue r Source #
Convert an integer to an index in a 1-indexed language Since GOOL is 0-indexed, we need to add 1
indexToInt' :: (Literal r, NumericExpression r, RenderValue r, ValueElim r) => SValue r -> SValue r Source #
Convert an index to an integer in a 1-indexed language Since GOOL is 0-indexed, we need to subtract 1
varDecDef :: DeclStatement r smt => SVariable r -> r ScopeData -> SValue r -> MS (r smt) Source #
Declare a variable and give it a value.
Not for use with arrays; use arrayDecDef instead.
openFileR' :: (Literal r, ValueExpression r) => SValue r -> SValue r Source #
openFileW' :: (Literal r, ValueExpression r) => SValue r -> SValue r Source #
openFileA' :: (Literal r, ValueExpression r) => SValue r -> SValue r Source #
setMethodCall :: InternalValueExp r => Label -> SValue r -> SValue r -> SValue r Source #