Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Analyzer.ConstExpressionConverters
Description
Useful constant expression converters.
Synopsis
- simplifyConstExpr :: Expression -> Either Err (MaybeVoid Type, Expression)
- simplifyConstIntExpr :: Expression -> Either Err Int
- convertIntegerToInt :: Integer -> Either Err Int
- simplifyConstExpr' :: Expression -> Either Err (PrimitiveValue Integer)
- mapErr :: Err -> Err
- data Err
Documentation
simplifyConstExpr :: Expression -> Either Err (MaybeVoid Type, Expression) Source #
Simplifies expression to value expression if possible.
simplifyConstIntExpr :: Expression -> Either Err Int Source #
Simplifies expression to int if possible.
simplifyConstExpr' :: Expression -> Either Err (PrimitiveValue Integer) Source #
Simplifies expression to primitive value if possible.
Constructors
MismatchedTypes | |
DivisionByZero | |
NotInIntBounds | |
NotConstExpr |