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

GOOL.Drasil

Description

re-export smart constructors for external code writing

Documentation

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

type SFile a = FS (a (File a)) Source #

type MSBody a = MS (a (Body a)) Source #

type MSBlock a = MS (a (Block a)) Source #

type VSType a = VS (a (Type a)) Source #

type SVariable a = VS (a (Variable a)) Source #

type SValue a = VS (a (Value a)) Source #

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 SMethod a = MS (a (Method a)) Source #

type CSStateVar a = CS (a (StateVar a)) Source #

type SClass a = CS (a (Class a)) Source #

type FSModule a = FS (a (Module a)) Source #

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

class FileSym r => ProgramSym r where Source #

Associated Types

type Program r Source #

Methods

prog :: Label -> Label -> [SFile r] -> GSProgram r Source #

class ModuleSym r => FileSym r where Source #

Associated Types

type File r Source #

Methods

fileDoc :: FSModule r -> SFile r Source #

docMod :: String -> [String] -> String -> SFile r -> SFile r Source #

class PermanenceSym r where Source #

Associated Types

type Permanence r Source #

class BlockSym r => BodySym r where Source #

Associated Types

type Body r Source #

Methods

body :: [MSBlock r] -> MSBody r Source #

addComments :: Label -> MSBody r -> MSBody r Source #

class StatementSym r => BlockSym r where Source #

Associated Types

type Block r Source #

Methods

block :: [MSStatement r] -> MSBlock r Source #

class TypeSym r => TypeElim r where Source #

Methods

getType :: r (Type r) -> CodeType Source #

getTypeString :: r (Type r) -> String Source #

class ThunkSym r Source #

Associated Types

type Thunk (r :: Type -> Type) Source #

class TypeSym r => VectorType r where Source #

Methods

vecType :: VSType r -> VSType r Source #

class (VariableSym r, ThunkSym r) => VectorThunk r where Source #

Methods

vecThunk :: SVariable r -> VSThunk r Source #

class (ThunkSym r, ValueSym r) => VectorExpression r where Source #

Methods

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

vecAdd :: VSThunk r -> VSThunk r -> VSThunk r Source #

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

vecDot :: VSThunk r -> VSThunk r -> VSThunk r Source #

class (VariableSym r, ThunkSym r, StatementSym r) => ThunkAssign r where Source #

Methods

thunkAssign :: SVariable r -> VSThunk r -> MSStatement r Source #

class ValueSym r => StatementSym r where Source #

Associated Types

type Statement r 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 #

assign :: SVariable r -> SValue r -> MSStatement r Source #

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

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

Methods

inOutCall :: InOutCall r Source #

selfInOutCall :: InOutCall r Source #

extInOutCall :: Library -> InOutCall r Source #

class VariableSym r => VariableElim r where Source #

Methods

variableName :: r (Variable r) -> String Source #

variableType :: r (Variable r) -> r (Type r) Source #

($->) :: VariableSym r => SVariable r -> SVariable r -> SVariable r infixl 9 Source #

class TypeSym r => ValueSym r where Source #

Associated Types

type Value r Source #

Methods

valueType :: r (Value r) -> r (Type r) Source #

class ValueSym r => Argument r where Source #

Methods

pointerArg :: SValue r -> SValue r Source #

class ValueSym r => MathConstant r where Source #

Methods

pi :: SValue r Source #

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

Methods

valueOf :: SVariable r -> SValue r Source #

class ValueSym r => NumericExpression r where Source #

Methods

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

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

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

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

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

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

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

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

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

log :: SValue r -> SValue r Source #

ln :: SValue r -> SValue r Source #

exp :: SValue r -> SValue r Source #

sin :: SValue r -> SValue r Source #

cos :: SValue r -> SValue r Source #

tan :: SValue r -> SValue r Source #

csc :: SValue r -> SValue r Source #

sec :: SValue r -> SValue r Source #

cot :: SValue r -> SValue r Source #

arcsin :: SValue r -> SValue r Source #

arccos :: SValue r -> SValue r Source #

arctan :: SValue r -> SValue r Source #

floor :: SValue r -> SValue r Source #

ceil :: SValue r -> SValue r Source #

class ValueSym r => BooleanExpression r where Source #

Methods

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

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

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

class ValueSym r => Comparison r where Source #

Methods

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

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

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

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

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

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

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

Methods

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

funcAppMixedArgs :: MixedCall r Source #

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 #

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

notNull :: SValue r -> SValue r Source #

funcApp :: 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 #

Associated Types

type Function r Source #

Methods

func :: Label -> VSType r -> [SValue r] -> VSFunction r Source #

objAccess :: SValue r -> VSFunction r -> SValue r Source #

($.) :: FunctionSym r => SValue r -> VSFunction r -> SValue r infixl 9 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 #

class ValueSym r => List r where Source #

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

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

class BodySym r => StatePattern r where Source #

Methods

checkState :: Label -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r 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 #

class ScopeSym r where Source #

Associated Types

type Scope r Source #

Methods

private :: r (Scope r) Source #

public :: r (Scope r) Source #

class VariableSym r => ParameterSym r where Source #

Associated Types

type Parameter r Source #

class (BodySym r, ParameterSym r, ScopeSym r, PermanenceSym r) => MethodSym r where Source #

Associated Types

type Method r Source #

Methods

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 #

class (ScopeSym r, PermanenceSym r, VariableSym r) => StateVarSym r where Source #

Associated Types

type StateVar r Source #

Methods

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 #

class (MethodSym r, StateVarSym r) => ClassSym r where Source #

Associated Types

type Class r Source #

class ClassSym r => ModuleSym r where Source #

Associated Types

type Module r Source #

Methods

buildModule :: Label -> [Label] -> [SMethod r] -> [SClass r] -> FSModule r Source #

data ScopeTag Source #

Constructors

Pub 
Priv 

Instances

Instances details
Eq ScopeTag Source # 
Instance details

Defined in GOOL.Drasil.AST

data CodeType Source #

Instances

Instances details
Show CodeType Source # 
Instance details

Defined in GOOL.Drasil.CodeType

Eq CodeType Source # 
Instance details

Defined in GOOL.Drasil.CodeType

data GOOLState Source #

Constructors

GS 

Fields

lensMStoVS :: Lens' MethodState ValueState Source #

onStateValue :: (a -> b) -> State s a -> State s b Source #

onCodeList :: Monad m => ([a] -> b) -> [m a] -> m b Source #

unCI :: CodeInfo a -> a Source #

unPC :: PythonCode a -> a Source #

unJC :: JavaCode a -> a Source #

unCSC :: CSharpCode a -> a Source #

unCPPC :: CppCode CppSrcCode CppHdrCode a -> a Source #

unSC :: SwiftCode a -> a Source #