[GHC] #12514: Can't write unboxed sum type constructors in prefix form

GHC ghc-devs at haskell.org
Sun Dec 18 15:52:09 UTC 2016


#12514: Can't write unboxed sum type constructors in prefix form
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
  (Parser)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"b5d788aa0e73fdf22cca3f88962e7652b07073cc/ghc"
 b5d788aa/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="b5d788aa0e73fdf22cca3f88962e7652b07073cc"
 Introduce unboxedSum{Data,Type}Name to template-haskell

 Summary:
 In D2448 (which introduced Template Haskell support for unboxed
 sums), I neglected to add `unboxedSumDataName` and `unboxedSumTypeName`
 functions, since there wasn't any way you could write unboxed sum data or
 type
 constructors in prefix form to begin with (see #12514). But even if you
 can't
 write these `Name`s directly in source code, it would still be nice to be
 able
 to use these `Name`s in Template Haskell (for instance, to be able to
 treat
 unboxed sum type constructors like any other type constructors).

 Along the way, this uncovered a minor bug in `isBuiltInOcc_maybe` in
 `TysWiredIn`, which was calculating the arity of unboxed sum data
 constructors
 incorrectly.

 Test Plan: make test TEST=T12478_5

 Reviewers: osa1, goldfire, austin, bgamari

 Subscribers: thomie

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

 GHC Trac Issues: #12478, #12514
 }}}

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


More information about the ghc-tickets mailing list