Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Drasil.CodeExpr
Description
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
- message :: (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
- 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
- addI :: r -> r -> r
- addRe :: r -> r -> r
- mulI :: r -> r -> r
- mulRe :: r -> r -> r
- ($-) :: r -> r -> r
- ($/) :: r -> r -> r
- ($^) :: r -> r -> r
- ($=>) :: r -> r -> r
- ($<=>) :: r -> r -> r
- ($&&) :: r -> r -> r
- ($||) :: 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
- defint :: Symbol -> r -> r -> r -> r
- defsum :: Symbol -> r -> r -> r -> r
- defprod :: Symbol -> r -> r -> r -> r
- realInterval :: HasUID c => c -> RealInterval r r -> r
- euclidean :: [r] -> r
- cross :: r -> r -> r
- completeCase :: [(r, r)] -> r
- incompleteCase :: [(r, r)] -> r
- matrix :: [[r]] -> r
- m2x2 :: r -> r -> r -> r -> r
- vec2D :: r -> r -> r
- dgnl2x2 :: r -> r -> r
- apply :: (HasUID f, HasSymbol f) => f -> [r] -> r
- applyWithNamedArgs :: (HasUID f, HasSymbol f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, 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 #
Methods
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
message :: (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
Instances
CodeExprC CodeExpr Source # | |
Defined in Language.Drasil.Code.Expr.Class Methods 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 # message :: (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 # |
Methods
($=) :: r -> r -> r infixr 4 #
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 (Integers).
Add two expressions (Real numbers).
Multiply two expressions (Integers).
Multiply two expressions (Real numbers).
($/) :: r -> r -> r infixl 7 #
($^) :: r -> r -> r infixr 8 #
($&&) :: r -> r -> r infixr 9 #
($||) :: r -> r -> r infixr 9 #
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.
defint :: Symbol -> r -> r -> r -> r #
Smart constructor for the summation, product, and integral functions over an interval.
defsum :: Symbol -> r -> r -> r -> r #
Smart constructor for the summation, product, and integral functions over an interval.
defprod :: Symbol -> r -> r -> r -> r #
Smart constructor for the summation, product, and integral functions over an interval.
realInterval :: HasUID c => c -> RealInterval r r -> r #
Smart constructor for 'real interval' membership.
Euclidean function : takes a vector and returns the sqrt of the sum-of-squares.
Smart constructor to cross product two expressions.
completeCase :: [(r, r)] -> r #
Smart constructor for case statements with a complete set of cases.
incompleteCase :: [(r, r)] -> r #
Smart constructor for case statements with an incomplete set of cases.
Create a matrix. TODO: Re-work later.
m2x2 :: r -> r -> r -> r -> r #
Create a two-by-two matrix from four given values. For example:
>>>
m2x2 1 2 3 4
[ [1,2], [3,4] ]
Create a 2D vector (a matrix with two rows, one column). First argument is placed above the second.
Creates a diagonal two-by-two matrix. For example:
>>>
dgnl2x2 1 2
[ [1, 0], [0, 2] ]
apply :: (HasUID f, HasSymbol f) => f -> [r] -> r #
Applies a given function with a list of parameters.
applyWithNamedArgs :: (HasUID f, HasSymbol f, HasUID a, IsArgumentName a) => f -> [r] -> [(a, r)] -> r #