GHC.Core.Opt.ConstantFold
Description
Constant Folder
primOpRules :: Name -> PrimOp -> Maybe CoreRule Source #
builtinRules :: [CoreRule] Source #
caseRules :: Platform -> CoreExpr -> Maybe (CoreExpr, AltCon -> Maybe AltCon, Id -> CoreExpr) Source #
Match the scrutinee of a case and potentially return a new scrutinee and a function to apply to each literal alternative.
caseRules2 Source #
Arguments
Scutinee
Case-binder
Alternatives in standard (increasing) order
Case rules
It's important that occurrence info are present, hence the use of In* types.