[GHC] #14498: GHC internal error: "not in scope during TC but it passed the renamer"
GHC
ghc-devs at haskell.org
Tue Nov 21 15:19:08 UTC 2017
#14498: GHC internal error: "not in scope during TC but it passed the renamer"
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.2.1
checker) | Keywords:
Resolution: | PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: #14288 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Replying to [comment:3 simonpj]:
> Short term: GHC should not crash. Maybe it should just reject the
program.
I agree that until we implement #14288, this shouldn't crash. In fact,
given that `kk` doesn't technically scope over the pattern at the moment,
I'm surprised that GHC doesn't come up with a fresh `kk` type variable in
the pattern `(App (Typeable :: TypeRep (a::kk -> k')) n)` (in fact, if you
change it to `(App (Typeable :: TypeRep (a::kk2 -> k')) n)`, then it
compiles). This makes me suspect that the code which renamed pattern
synonyms is doing something suspicious at the moment.
> Slightly longer term: we need to decide if we want to adopt the proposal
in commment:15 of #14288. Would this be worth a short GHC proposal? It's
certainly a change in the surface language.
To answer your two questions:
* Yes. I've been lacking the free time to look at comment:15 of #14288,
but perhaps I can take a look this week.
* I suppose we could put this forth as a proposal.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14498#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list