ghc-7.0.3: The GHC API

CoreArity

Description

Arit and eta expansion

Synopsis

Documentation

manifestArity :: CoreExpr -> AritySource

manifestArity sees how many leading value lambdas there are

exprArity :: CoreExpr -> AritySource

An approximate, fast, version of exprEtaExpandArity

etaExpandSource

Arguments

:: Arity

Result should have this number of value args

-> CoreExpr

Expression to expand

-> CoreExpr 

etaExpand n us e ty returns an expression with the same meaning as e, but with arity n.

Given:

 e' = etaExpand n us e ty

We should have that:

 ty = exprType e = exprType e'