[GHC] #11345: Template Haskell's handling of infix GADT constructors is broken
GHC
ghc-devs at haskell.org
Fri Jan 8 11:25:30 UTC 2016
#11345: Template Haskell's handling of infix GADT constructors is broken
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: RyanGlScott
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1744
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"0163427761c0e72a3acf09f854b3447f2e553f1b/ghc"
01634277/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="0163427761c0e72a3acf09f854b3447f2e553f1b"
Fix Template Haskell's handling of infix GADT constructors
This is the second (and hopefully last) fix needed to make TH handle
GADTs properly (after D1465). This Diff addresses some issues with infix
GADT constructors, specifically:
* Before, you could not determine if a GADT constructor was declared
infix because TH did not give you the ability to determine if there is
a //user-specified// fixity declaration for that constructor. The
return type of `reifyFixity` was changed to `Maybe Fixity` so that it
yields `Just` the fixity is there is a fixity declaration, and
`Nothing` otherwise (indicating it has `defaultFixity`).
* `DsMeta`/`Convert` were changed so that infix GADT constructors are
turned into `GadtC`, not `InfixC` (which should be reserved for
Haskell98 datatype declarations).
* Some minor fixes to the TH pretty-printer so that infix GADT
constructors will be parenthesized in GADT signatures.
Fixes #11345.
Test Plan: ./validate
Reviewers: goldfire, austin, bgamari, jstolarek
Reviewed By: jstolarek
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1744
GHC Trac Issues: #11345
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11345#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list