[GHC] #13968: TH gives "Illegal binding of built-in syntax" error
GHC
ghc-devs at haskell.org
Wed Jul 26 21:17:46 UTC 2017
#13968: TH gives "Illegal binding of built-in syntax" error
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3789
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"d774b4e2de4f07d2432b67010305fede7aeefc78/ghc" d774b4e/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="d774b4e2de4f07d2432b67010305fede7aeefc78"
Fix #13968 by consulting isBuiltInOcc_maybe
Summary:
We were unconditionally reporting `Illegal binding of built-in syntax`
in an error message, but this error doesn't make sense in certain Template
Haskell scenarios which can trigger it. Let's give a more sensible error
message by first checking if the name we're binding really is built-in
syntax,
using the handy `isBuiltInOcc_maybe` function.
Test Plan: make test TEST=T13968
Reviewers: bgamari, austin, goldfire
Reviewed By: goldfire
Subscribers: goldfire, rwbarton, thomie
GHC Trac Issues: #13968
Differential Revision: https://phabricator.haskell.org/D3789
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13968#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list