[GHC] #11371: Bogus in-scope set in substitutions
GHC
ghc-devs at haskell.org
Wed Feb 17 17:48:08 UTC 2016
#11371: Bogus in-scope set in substitutions
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: niteria
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11360 | Differential Rev(s): phab:D1792,
Wiki Page: | phab:D1801, phab:D1802
-------------------------------------+-------------------------------------
Comment (by simonpj):
There's a lot going on here. Concerning comment:39, here is what is
happening:
* `CoreSyn.applyTypeToArg` deliberately calls `piResultTy` with a
possibly-bottom second argument. It'll be bottom when the type is `t1 ->
t2` and the arg is some non-`Type` expression.
* `piResultTy` calls `piResultTys`
* When `piResultTys` finishes it calls `substTy`
* Which looks at the substitution
* Which is bottom because you built it strictly from its in-scope set
* Which was bottom because the second arg to `piResultTy` was bottom
Sigh. We could improve matters, but that is at least why you are getting
the panic.
So go back to being lazy. The exponential `typeKind` stuff seems more
likely. Can you just count how many calls to `piResultTy` and/or
`typeKind` are being made? And if large, then on what shaped types?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11371#comment:41>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list