[GHC] #12977: Template Haskell: unboxedTupleTypeName doesn't handle unboxed 0- and 1-tuples

GHC ghc-devs at haskell.org
Thu Dec 15 15:43:17 UTC 2016


#12977: Template Haskell: unboxedTupleTypeName doesn't handle unboxed 0- and
1-tuples
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  RyanGlScott
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2847
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"9550b8d810c3ce9fcf3419da367041124e2673de/ghc" 9550b8d/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="9550b8d810c3ce9fcf3419da367041124e2673de"
 Make unboxedTuple{Type,Data}Name support 0- and 1-tuples

 Previously, these functions were hardcoded so as to always `error`
 whenever given an argument of 0 or 1. This restriction can be lifted
 pretty easily, however.

 This requires a slight tweak to `isBuiltInOcc_maybe` in `TysWiredIn` to
 allow it to recognize `Unit#` (which is the hard-wired `OccName` for
 unboxed 1-tuples).

 Fixes #12977.

 Test Plan: make test TEST=12977

 Reviewers: austin, goldfire, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2847

 GHC Trac Issues: #12977
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12977#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list