ivory-opts-0.1.0.6: Ivory compiler optimizations.

Safe HaskellNone
LanguageHaskell2010

Ivory.Opts.ConstFoldComp

Synopsis

Documentation

data CfVal Source #

Constant-folded values.

Instances
Eq CfVal Source # 
Instance details

Defined in Ivory.Opts.ConstFoldComp

Methods

(==) :: CfVal -> CfVal -> Bool #

(/=) :: CfVal -> CfVal -> Bool #

Show CfVal Source # 
Instance details

Defined in Ivory.Opts.ConstFoldComp

Methods

showsPrec :: Int -> CfVal -> ShowS #

show :: CfVal -> String #

showList :: [CfVal] -> ShowS #

err :: String -> a Source #

toExpr :: CfVal -> Expr Source #

Convert back to an expression.

destLit :: Expr -> Maybe Literal Source #

Literal expression destructor.

destBoolLit :: Expr -> Maybe Bool Source #

Boolean literal destructor.

destIntegerLit :: Expr -> Maybe Integer Source #

Integer literal destructor.

cfFloating :: ExpOp -> [CfVal] -> CfVal Source #

Constant folding for unary operations that require a floating instance.