#5028: stage3 build failing with core-lint error
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.2.1
Component: Compiler | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Building GHC failed
---------------------------------+------------------------------------------
Comment(by batterseapower):
It looks like this is because OccAnal implements binder-swapping. So if
you have this in the input:
{{{
case x of y { p -> e[x] }
}}}
Then you get this in the output:
{{{
case x of y { p -> let x = y in e }
}}}
This makes y live, and if it was dead to begin with this causes a lint
error. I had absolutely no idea OccAnal was playing games like this!
My first thought was that perhaps OccAnal should be setting the OccInfo on
the "y" in it's manufactured binding to e.g. NoOccInfo. This would
certainly make the error go away, but it is not in the spirit of OccAnal -
as far as I can tell, OccAnal guarantees that *binders* will have the
right OccInfo, but relies on the simplifier to ensure that the
*occurrences* are up-to-date.
The obvious thing to do is paramaterise OccAnal so we can prevent it from
implementing binder-swap when we use it just before CorePrep. I'm working
on a patch to that effect.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5028#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs