| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Expr.Development
Synopsis
- data Expr where
- Lit :: Literal -> Expr
- AssocA :: AssocArithOper -> [Expr] -> Expr
- AssocB :: AssocBoolOper -> [Expr] -> Expr
- AssocC :: AssocConcatOper -> [Expr] -> Expr
- C :: UID -> Expr
- FCall :: UID -> [Expr] -> Expr
- Case :: Completeness -> [(Expr, Relation)] -> Expr
- Matrix :: [[Expr]] -> Expr
- Set :: Space -> [Expr] -> Expr
- Variable :: String -> Expr -> Expr
- UnaryOp :: UFunc -> Expr -> Expr
- UnaryOpB :: UFuncB -> Expr -> Expr
- UnaryOpVV :: UFuncVV -> Expr -> Expr
- UnaryOpVN :: UFuncVN -> Expr -> Expr
- ArithBinaryOp :: ArithBinOp -> Expr -> Expr -> Expr
- EqBinaryOp :: EqBinOp -> Expr -> Expr -> Expr
- LABinaryOp :: LABinOp -> Expr -> Expr -> Expr
- OrdBinaryOp :: OrdBinOp -> Expr -> Expr -> Expr
- VVVBinaryOp :: VVVBinOp -> Expr -> Expr -> Expr
- VVNBinaryOp :: VVNBinOp -> Expr -> Expr -> Expr
- NVVBinaryOp :: NVVBinOp -> Expr -> Expr -> Expr
- ESSBinaryOp :: ESSBinOp -> Expr -> Expr -> Expr
- ESBBinaryOp :: ESBBinOp -> Expr -> Expr -> Expr
- Operator :: AssocArithOper -> DiscreteDomainDesc Expr Expr -> Expr -> Expr
- RealI :: UID -> RealInterval Expr Expr -> Expr
- data UFunc
- data UFuncB = Not
- data UFuncVV = NegV
- data UFuncVN
- data ArithBinOp
- data EqBinOp
- data LABinOp
- data OrdBinOp
- data VVVBinOp
- data VVNBinOp = Dot
- data NVVBinOp = Scale
- data ESSBinOp
- data ESBBinOp = SContains
- data AssocArithOper
- data AssocBoolOper
- data AssocConcatOper = SUnion
- data Completeness
- type Relation = Expr
- eDep :: Expr -> [UID]
- eNames :: Expr -> [UID]
- eNames' :: Expr -> [UID]
- eNamesRI :: RealInterval Expr Expr -> [UID]
- precA :: AssocArithOper -> Int
- precB :: AssocBoolOper -> Int
- precC :: AssocConcatOper -> Int
- eprec :: Expr -> Int
Documentation
Expression language where all terms are supposed to be 'well understood' (i.e., have a definite meaning). Right now, this coincides with "having a definite value", but should not be restricted to that.
Constructors
| Lit :: Literal -> Expr | Brings a literal into the expression language. |
| AssocA :: AssocArithOper -> [Expr] -> Expr | Takes an associative arithmetic operator with a list of expressions. |
| AssocB :: AssocBoolOper -> [Expr] -> Expr | Takes an associative boolean operator with a list of expressions. |
| AssocC :: AssocConcatOper -> [Expr] -> Expr | |
| C :: UID -> Expr | C stands for Chunk, for referring to a chunk in an expression. Implicitly assumes that the chunk has a symbol. |
| FCall :: UID -> [Expr] -> Expr | Function applications. |
| Case :: Completeness -> [(Expr, Relation)] -> Expr | For multi-case expressions, each pair represents one case. |
| Matrix :: [[Expr]] -> Expr | Represents a matrix of expressions. |
| Set :: Space -> [Expr] -> Expr | Represents a set of expressions |
| Variable :: String -> Expr -> Expr | used to refernce the (name + type = variable ) |
| UnaryOp :: UFunc -> Expr -> Expr | Unary operation for most functions (eg. sin, cos, log, etc.). |
| UnaryOpB :: UFuncB -> Expr -> Expr | Unary operation for |
| UnaryOpVV :: UFuncVV -> Expr -> Expr | Unary operation for |
| UnaryOpVN :: UFuncVN -> Expr -> Expr | Unary operation for |
| ArithBinaryOp :: ArithBinOp -> Expr -> Expr -> Expr | Binary operator for arithmetic between expressions (fractional, power, and subtraction). |
| EqBinaryOp :: EqBinOp -> Expr -> Expr -> Expr | Binary operator for equality between expressions. |
| LABinaryOp :: LABinOp -> Expr -> Expr -> Expr | Binary operator for indexing two expressions. |
| OrdBinaryOp :: OrdBinOp -> Expr -> Expr -> Expr | Binary operator for ordering expressions (less than, greater than, etc.). |
| VVVBinaryOp :: VVVBinOp -> Expr -> Expr -> Expr | Binary operator for |
| VVNBinaryOp :: VVNBinOp -> Expr -> Expr -> Expr | Binary operator for |
| NVVBinaryOp :: NVVBinOp -> Expr -> Expr -> Expr | Binary operator for |
| ESSBinaryOp :: ESSBinOp -> Expr -> Expr -> Expr | Set operator for Element + Set -> Set |
| ESBBinaryOp :: ESBBinOp -> Expr -> Expr -> Expr | Set operator for Element + Set -> Bool |
| Operator :: AssocArithOper -> DiscreteDomainDesc Expr Expr -> Expr -> Expr | Operators are generalized arithmetic operators over a |
| RealI :: UID -> RealInterval Expr Expr -> Expr | A different kind of |
Instances
Unary functions (abs, log, ln, sin, etc.).
Bool -> Bool operators.
Constructors
| Not |
Vector -> Vector operators.
Constructors
| NegV |
Vector -> Number operators.
data ArithBinOp Source #
Arithmetic operators (fractional, power, and subtraction).
Instances
| Eq ArithBinOp Source # | |
Defined in Language.Drasil.Expr.Lang | |
Equality operators (equal or not equal).
Ordered binary operators (less than, greater than, less than or equal to, greater than or equal to).
Vector x Vector -> Vector binary operations (cross product, addition, subtraction).
Vector x Vector -> Number binary operations (dot product).
Constructors
| Dot |
Number x Vector -> Vector binary operations (scaling).
Constructors
| Scale |
Element + Set -> Set
Element + Set -> Bool
Constructors
| SContains |
data AssocArithOper Source #
Associative operators (adding and multiplication). Also specifies whether it is for integers or for real numbers.
Instances
| Eq AssocArithOper Source # | |
Defined in Language.Drasil.Expr.Lang Methods (==) :: AssocArithOper -> AssocArithOper -> Bool # (/=) :: AssocArithOper -> AssocArithOper -> Bool # | |
data AssocBoolOper Source #
Associative boolean operators (and, or).
Instances
| Eq AssocBoolOper Source # | |
Defined in Language.Drasil.Expr.Lang Methods (==) :: AssocBoolOper -> AssocBoolOper -> Bool # (/=) :: AssocBoolOper -> AssocBoolOper -> Bool # | |
data AssocConcatOper Source #
Constructors
| SUnion |
Instances
| Eq AssocConcatOper Source # | |
Defined in Language.Drasil.Expr.Lang Methods (==) :: AssocConcatOper -> AssocConcatOper -> Bool # (/=) :: AssocConcatOper -> AssocConcatOper -> Bool # | |
data Completeness Source #
For case expressions (either complete or incomplete).
Constructors
| Complete | |
| Incomplete |
Instances
| Eq Completeness Source # | |
Defined in Language.Drasil.Expr.Lang | |
eNames' :: Expr -> [UID] Source #
Generic traverse of all positions that could lead to eNames without
functions. FIXME : this should really be done via post-facto filtering, but
right now the information needed to do this is not available!
eNamesRI :: RealInterval Expr Expr -> [UID] Source #
Generic traversal of everything that could come from an interval to names (similar to eNames).
precA :: AssocArithOper -> Int Source #
precA - precedence for arithmetic-related Binary-Associative (Commutative) operators.
precB :: AssocBoolOper -> Int Source #
precB - precedence for boolean-related Binary-Associative (Commutative) operators.
precC :: AssocConcatOper -> Int Source #