[GHC] #13989: use templateHaskell type checker panic
GHC
ghc-devs at haskell.org
Mon Jul 17 15:21:36 UTC 2017
#13989: use templateHaskell type checker panic
-------------------------------------+-------------------------------------
Reporter: chinaxing | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.2
checker) |
Resolution: duplicate | Keywords:
Operating System: Unknown/Multiple | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: #13106 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* resolution: => duplicate
* related: => #13106
Comment:
Indeed, it's a duplicate of #13106. Moreover, the panic has nothing to do
with Template Haskell. Here's the error you get with GHC 8.2.1:
{{{
$ /opt/ghc/8.2.1/bin/ghci Bug.hs
GHCi, version 8.2.0.20170704: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Service.HAEventBroker ( Bug.hs, interpreted )
Bug.hs:25:13: error:
Variable not in scope:
get
:: Update
Service.HAEventBroker.EventQueue
Service.HAEventBroker.EventQueue
|
25 | EvQ el <- get
| ^^^
Bug.hs:26:3: error:
Variable not in scope:
put
:: Service.HAEventBroker.EventQueue
-> Update Service.HAEventBroker.EventQueue ()
|
26 | put $ EvQ (e:el)
| ^^^
Bug.hs:30:13: error:
Variable not in scope:
get
:: Update
Service.HAEventBroker.EventQueue
Service.HAEventBroker.EventQueue
|
30 | EvQ el <- get
| ^^^
Bug.hs:34:3: error:
Variable not in scope:
put
:: Service.HAEventBroker.EventQueue
-> Update
Service.HAEventBroker.EventQueue
[Service.HAEventBroker.HAEvent]
|
34 | put $ EvQ r
| ^^^
Bug.hs:36:14: error:
• Not in scope: data constructor ‘EventQueue’
• In the Template Haskell quotation 'EventQueue
|
36 | $(makeAcidic 'EventQueue ['putEvent, 'pollEvent])
| ^^^^^^^^^^^
}}}
So the issue is out-of-scope identifiers.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13989#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list