ghc-8.2.2: The GHC API

Safe HaskellNone




data Unfolding #

Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in CoreUnfold

noUnfolding :: Unfolding #

There is no known Unfolding

mkInlineUnfolding :: CoreExpr -> Unfolding #

Make an unfolding that may be used unsaturated (ug_unsat_ok = unSaturatedOk) and that is reported as having its manifest arity (the number of outer lambdas applications will resolve before doing any work).

mkInlineUnfoldingWithArity :: Arity -> CoreExpr -> Unfolding #

Make an unfolding that will be used once the RHS has been saturated to the given arity.

exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (DataCon, [Type], [CoreExpr]) #

Returns Just (dc, [], [x1..xn]) if the argument expression is a *saturated* constructor application of the form dc x1 .. xn, where are the *universally-qantified* type args of dc