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

GHC ghc-devs at haskell.org
Mon Aug 22 00:06:43 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)                           |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 You can write `(# Int | Char #)`, but not `(# | #) Int Char`. This is
 annoying since it prevents you from partially applying unboxed sum type
 constructors, and it also precludes you from doing cool things like `reify
 ''(#||#)` (as I woefully noted [https://phabricator.haskell.org/D2448
 here]).

 Luckily, I don't think fixing this would be too hard. The special case of
 parsing unboxed tuple type constructors as prefix is handled
 [http://git.haskell.org/ghc.git/blob/0d3bf62092de83375025edca6f7242812338542d:/compiler/parser/Parser.y#l2861
 here], so I //think// we'd just need to add a similar case for unboxed
 sums.

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


More information about the ghc-tickets mailing list