Skip to content
Snippets Groups Projects
Commit 91eb1857 authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Marge Bot
Browse files

Fix a subtle scoping error in simplLazyBind

In the call to prepareBinding (in simplLazyBind), I had failed to
extend the in-scope set with the binders from body_floats1. As as
result, when eta-expanding deep inside prepareBinding we made up
an eta-binder that shadowed a variable free in body1.  Yikes.

It's hard to trigger this bug.  It showed up when I was working
on !5658, and I started using the in-scope set for eta-expansion,
rather than taking free variables afresh.  But even then it only
showed up when compiling a module in Haddock
   utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs

Sadly Haddock is compiled without Core Lint, so we ultimately got
a seg-fault.  Lint nailed it fast once I realised that it was off.

There is some other tiny refactoring in this patch.
parent 299b7436
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment