Copyright | Brent Yorgey |
---|---|
License | BSD-3-Clause |
Maintainer | byorgey@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Term elaboration which happens after type checking.
Documentation
elaborate :: Term -> Term Source #
Perform some elaboration / rewriting on a fully type-annotated
term, given its top-level type. This currently performs such
operations as rewriting if
expressions and recursive let
expressions to use laziness appropriately. In theory it could
also perform rewriting for overloaded constants depending on the
actual type they are used at, but currently that sort of thing
tends to make type inference fall over.