mini-go-0.3.0.0: Mini Go parser and interpreter
Safe HaskellSafe-Inferred
LanguageHaskell2010

Analyzer.ConstExpressionConverters

Description

Useful constant expression converters.

Synopsis

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.

convertIntegerToInt :: Integer -> Either Err Int Source #

Converts integer to int if possible.

simplifyConstExpr' :: Expression -> Either Err (PrimitiveValue Integer) Source #

Simplifies expression to primitive value if possible.