[GHC] #14627: qAddTopDecls: can't convert top-level declarations
GHC
ghc-devs at haskell.org
Mon Jul 2 01:36:25 UTC 2018
#14627: qAddTopDecls: can't convert top-level declarations
-------------------------------------+-------------------------------------
Reporter: tianxiaogu | Owner: mgsloan
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by mgsloan):
I've put up a patch that makes addTopDelcs no longer panic for conversion
errors: https://phabricator.haskell.org/D4914 . Instead they are reported
as normal errors like this:
{{{
T14627.hs:3:3: error:
qAddTopDecls: can't convert declarations:
Illegal variable name: ‘Bool’
When splicing a TH declaration: f_0 = Bool
|
3 | $(do
| ^^...
}}}
Atop this, the error "Illegal variable name: 'Bool'" is quite poor,
instead it should just say there's an out of scope constructor. I have a
patch that fixes this and adds documentation to `UnboundVarE` clarifying
this case. Can't push it to phabricator yet, though, because it appears
to be down.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14627#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list