[GHC] #10845: Incorrect behavior when let binding implicit CallStack object
GHC
ghc-devs at haskell.org
Thu Oct 8 12:57:19 UTC 2015
#10845: Incorrect behavior when let binding implicit CallStack object
-------------------------------------+-------------------------------------
Reporter: nitromaster101 | Owner: gridaphobe
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10846 | Differential Rev(s):
-------------------------------------+-------------------------------------
Comment (by simonpj):
Ah, yes, you are correct. (You can have a nested implication with
skolems but no givens; that's important. Here there are no skolems
either, and it'd take a little longer to explain why.)
Rather than conditionally suppressing the no-given solver for `CallStack`,
a better way is probably this.
* Remove the auto-solve for `CallStack` (with no givens) altogether.
* Instead, look at `TcSimplify.simplifyInfer`. It figures out what to
quantify over. At top level (look at `rhs_tclvl`) we don't want to
quantify over `CallStack` constraints; instead we want to discharge
(solve) them. After getting the constraints back from `approximateWC`, we
can simply solve any un-solved `CallStack` constraints.
Does that help? I should have though of this first.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10845#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list