Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines functions to render CodeExpr
s as printable Expr
s.
Synopsis
- modelExpr' :: PrintingInformation -> Int -> ModelExpr -> Expr
- mkCall :: PrintingInformation -> Ops -> ModelExpr -> Expr
- mkBOp :: PrintingInformation -> Ops -> ModelExpr -> ModelExpr -> Expr
- neg' :: ModelExpr -> Bool
- neg :: PrintingInformation -> ModelExpr -> Expr
- indx :: PrintingInformation -> ModelExpr -> ModelExpr -> Expr
- call :: PrintingInformation -> UID -> [ModelExpr] -> Expr
- eopAdds :: PrintingInformation -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr
- eopMuls :: PrintingInformation -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr
- eop :: PrintingInformation -> AssocArithOper -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr
- sup :: Integer -> [Expr]
- modelExpr :: ModelExpr -> PrintingInformation -> Expr
- assocExpr :: Ops -> Int -> [ModelExpr] -> PrintingInformation -> Expr
- setExpr :: Ops -> Int -> [ModelExpr] -> PrintingInformation -> Expr
- addExpr :: [ModelExpr] -> AssocArithOper -> PrintingInformation -> [Expr]
- mulExpr :: [ModelExpr] -> AssocArithOper -> PrintingInformation -> [Expr]
- withParens :: PrintingInformation -> ModelExpr -> ModelExpr -> Expr
- pow :: PrintingInformation -> ModelExpr -> ModelExpr -> Expr
- renderRealInt :: PrintingInformation -> Symbol -> RealInterval ModelExpr ModelExpr -> Expr
Documentation
modelExpr' :: PrintingInformation -> Int -> ModelExpr -> Expr Source #
Helper that adds parenthesis to a display expression where appropriate.
mkCall :: PrintingInformation -> Ops -> ModelExpr -> Expr Source #
Helper that creates an expression row given printing information, an operator, and an expression.
mkBOp :: PrintingInformation -> Ops -> ModelExpr -> ModelExpr -> Expr Source #
Helper that creates a binary expression row given printing information, an operator, and two expressions.
call :: PrintingInformation -> UID -> [ModelExpr] -> Expr Source #
For printing expressions that call something.
eopAdds :: PrintingInformation -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr Source #
Helper function for addition EOperator
s.
eopMuls :: PrintingInformation -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr Source #
Helper function for multiplicative EOperator
s.
eop :: PrintingInformation -> AssocArithOper -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> Expr Source #
Helper function for translating EOperator
s.
modelExpr :: ModelExpr -> PrintingInformation -> Expr Source #
Translate Exprs to printable layout AST.
assocExpr :: Ops -> Int -> [ModelExpr] -> PrintingInformation -> Expr Source #
Common method of converting associative operations into printable layout AST.
addExpr :: [ModelExpr] -> AssocArithOper -> PrintingInformation -> [Expr] Source #
Add add symbol only when the second Expr is not negation
mulExpr :: [ModelExpr] -> AssocArithOper -> PrintingInformation -> [Expr] Source #
Helper for rendering printable expressions.
withParens :: PrintingInformation -> ModelExpr -> ModelExpr -> Expr Source #
Helper that adds parenthesis to the first expression. The second expression is written as a superscript attached to the first.
pow :: PrintingInformation -> ModelExpr -> ModelExpr -> Expr Source #
Helper for properly rendering exponents.
renderRealInt :: PrintingInformation -> Symbol -> RealInterval ModelExpr ModelExpr -> Expr Source #
Print a RealInterval
.