Skip to content
Snippets Groups Projects
Commit 145916b1 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Do not add unfoldings to lambda-binders

For reasons described in GHC.Core.Opt.Simplify
Historical Note [Case binders and join points],
we used to keep a Core unfolding in one of the lambda-binders
for a join point.  But this was always a gross hack -- it's
very odd to have an unfolding in a lambda binder, that refers to
earlier lambda binders.

The hack bit us in various ways:
* Most seriously, it is incompatible with linear types in Core.
* It complicated demand analysis, and could worsen results
* It required extra care in the simplifier (simplLamBinder)
* It complicated !5641 (look for "join binder unfoldings")

So this patch just removes the hack.  Happily, doind so turned out to
have no effect on performance.
parent 378c0bba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment