[GHC] #13242: Panic "StgCmmEnv: variable not found" with ApplicativeDo and ExistentialQuantification
GHC
ghc-devs at haskell.org
Wed Feb 22 11:25:27 UTC 2017
#13242: Panic "StgCmmEnv: variable not found" with ApplicativeDo and
ExistentialQuantification
-------------------------------------+-------------------------------------
Reporter: ljli | Owner: simonmar
Type: bug | Status: new
Priority: highest | Milestone: 8.0.3
Component: Compiler | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonmar):
> But the rule is terribly unsatisfactory.
Yes it is. I think I'd also be fine with disabling ApplicativeDo for all
statements following an existential pattern match. Or perhaps @rwbarton's
suggestion:
> whenever there is a pattern match that binds invisible stuff, just
assume that that stuff is used in all following statements
But by itself this doesn't solve the problem that the example in this
ticket raises, because the A type doesn't bind any dictionaries or
constraints.
By all means refactor the implementation of `tcApplicativeStmts`!
Provided the tests pass it should be fine. I remember trying quite hard
to simplify the implementation to use fewer fresh type variables, but I
couldn't figure out how to do it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13242#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list