Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Re-export CodeExpr constructors.
Synopsis
- data CodeExpr
- class CodeExprC r where
- new :: (Callable f, HasUID f, CodeIdea f) => f -> [r] -> r
- newWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, r)] -> r
- msg :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c) => c -> f -> [r] -> r
- msgWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c, HasUID a, IsArgumentName a) => c -> f -> [r] -> [(a, r)] -> r
- field :: CodeVarChunk -> CodeVarChunk -> r
- applyWithNamedArgs :: (HasUID f, HasSymbol f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, r)] -> r
- class ExprC r where
- lit :: Literal -> r
- ($=), ($!=) :: r -> r -> r
- ($<), ($>), ($<=), ($>=) :: r -> r -> r
- ($.) :: r -> r -> r
- ($+) :: r -> r -> r
- ($*) :: r -> r -> r
- ($-), ($/), ($^) :: r -> r -> r
- ($=>), ($<=>) :: r -> r -> r
- ($&&), ($||) :: r -> r -> r
- in' :: r -> r -> r
- abs_ :: r -> r
- neg :: r -> r
- log :: r -> r
- ln :: r -> r
- sqrt :: r -> r
- sin :: r -> r
- cos :: r -> r
- tan :: r -> r
- sec :: r -> r
- csc :: r -> r
- cot :: r -> r
- arcsin :: r -> r
- arccos :: r -> r
- arctan :: r -> r
- exp :: r -> r
- dim :: r -> r
- norm :: r -> r
- negVec :: r -> r
- not_ :: r -> r
- idx :: r -> r -> r
- idxOf :: r -> r -> r
- defint, defsum, defprod :: Symbol -> r -> r -> r -> r
- realInterval :: HasUID c => c -> RealInterval r r -> r
- euclidean :: [r] -> r
- cross :: r -> r -> r
- vScale :: r -> r -> r
- vAdd :: r -> r -> r
- vSub :: r -> r -> r
- completeCase :: [(r, r)] -> r
- incompleteCase :: [(r, r)] -> r
- matrix :: [[r]] -> r
- set' :: Space -> [r] -> r
- apply :: (HasUID f, HasSymbol f) => f -> [r] -> r
- sy :: (HasUID c, HasSymbol c) => c -> r
- class LiteralC r where
- expr :: Expr -> CodeExpr
Documentation
Expression language where all terms also denote a term in GOOL (i.e. translation is total and meaning preserving).
Instances
class CodeExprC r where Source #
new :: (Callable f, HasUID f, CodeIdea f) => f -> [r] -> r Source #
Constructs a CodeExpr for actor creation (constructor call)
newWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, r)] -> r Source #
Constructs a CodeExpr for actor creation (constructor call) that uses named arguments
msg :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c) => c -> f -> [r] -> r Source #
Constructs a CodeExpr for actor messaging (method call)
msgWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c, HasUID a, IsArgumentName a) => c -> f -> [r] -> [(a, r)] -> r Source #
Constructs a CodeExpr for actor messaging (method call) that uses named arguments
field :: CodeVarChunk -> CodeVarChunk -> r Source #
Constructs a CodeExpr representing the field of an actor
applyWithNamedArgs :: (HasUID f, HasSymbol f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, r)] -> r Source #
Instances
CodeExprC CodeExpr Source # | |
Defined in Language.Drasil.CodeExpr.Class new :: (Callable f, HasUID f, CodeIdea f) => f -> [CodeExpr] -> CodeExpr Source # newWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID a, IsArgumentName a) => f -> [CodeExpr] -> [(a, CodeExpr)] -> CodeExpr Source # msg :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c) => c -> f -> [CodeExpr] -> CodeExpr Source # msgWithNamedArgs :: (Callable f, HasUID f, CodeIdea f, HasUID c, HasSpace c, CodeIdea c, HasUID a, IsArgumentName a) => c -> f -> [CodeExpr] -> [(a, CodeExpr)] -> CodeExpr Source # field :: CodeVarChunk -> CodeVarChunk -> CodeExpr Source # applyWithNamedArgs :: (HasUID f, HasSymbol f, HasUID a, IsArgumentName a) => f -> [CodeExpr] -> [(a, CodeExpr)] -> CodeExpr Source # |
($=) :: r -> r -> r infixr 4 Source #
Smart constructor for ordering two equations.
Smart constructor for ordering two equations.
Smart constructor for ordering two equations.
Smart constructor for ordering two equations.
Smart constructor for the dot product of two equations.
Add two expressions.
Multiply two expressions.
($/) :: r -> r -> r infixl 7 Source #
($^) :: r -> r -> r infixr 8 Source #
($<=>) :: r -> r -> r Source #
($&&) :: r -> r -> r infixr 9 Source #
($||) :: r -> r -> r infixr 9 Source #
Smart constructor for set-theoretic membership relation. Added ' to avoid conflict.
Smart constructor for taking the absolute value of an expression.
Smart constructor for negating an expression.
Smart constructor to take the log of an expression.
Smart constructor to take the ln of an expression.
Smart constructor to take the square root of an expression.
Smart constructor to apply sin to an expression.
Smart constructor to apply cos to an expression.
Smart constructor to apply tan to an expression.
Smart constructor to apply sec to an expression.
Smart constructor to apply csc to an expression.
Smart constructor to apply cot to an expression.
Smart constructor to apply arcsin to an expression.
Smart constructor to apply arccos to an expression.
Smart constructor to apply arctan to an expression.
Smart constructor for the exponential (base e) function.
Smart constructor for calculating the dimension of a vector.
Smart constructor for calculating the normal form of a vector.
Smart constructor for negating vectors.
Smart constructor for applying logical negation to an expression.
Smart constructor for indexing.
Smart constructor for indexOf. Finds the index of the first occurrence of a value in a list.
defint :: Symbol -> r -> r -> r -> r Source #
Smart constructor for the summation, product, and integral functions over an interval.
defsum :: Symbol -> r -> r -> r -> r Source #
Smart constructor for the summation, product, and integral functions over an interval.
defprod :: Symbol -> r -> r -> r -> r Source #
Smart constructor for the summation, product, and integral functions over an interval.
realInterval :: HasUID c => c -> RealInterval r r -> r Source #
Smart constructor for 'real interval' membership.
euclidean :: [r] -> r Source #
Euclidean function : takes a vector and returns the sqrt of the sum-of-squares.
Smart constructor to cross product two expressions.
vScale :: r -> r -> r Source #
Smart constructor for vector scaling
Vector Addition
Vector Subtraction
completeCase :: [(r, r)] -> r Source #
Smart constructor for case statements with a complete set of cases.
incompleteCase :: [(r, r)] -> r Source #
Smart constructor for case statements with an incomplete set of cases.
Create a matrix.
set' :: Space -> [r] -> r Source #
Create a Set.
apply :: (HasUID f, HasSymbol f) => f -> [r] -> r Source #
Applies a given function with a list of parameters.