[GHC] #15367: Misleading error message when unboxed tuples used in sums without -XUnboxedTuples

GHC ghc-devs at haskell.org
Thu Jul 12 12:17:21 UTC 2018


#15367: Misleading error message when unboxed tuples used in sums without
-XUnboxedTuples
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15073            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => closed
 * resolution:   => duplicate
 * related:   => #15073


Comment:

 This is an (indirect) duplicate of #15073, which has been fixed in GHC
 8.6.1. In GHC 8.6.1, your program does indeed suggest enabling
 `UnboxedTuples`:

 {{{
 $ /opt/ghc/8.6.1/bin/ghc Bug.hs
 [1 of 1] Compiling Lib              ( Bug.hs, Bug.o )

 Bug.hs:5:1: error:
     • Illegal unboxed tuple type as function argument: (# Int, Int #)
       Perhaps you intended to use UnboxedTuples
     • In the type synonym declaration for ‘Foo’
   |
 5 | type Foo = (# (# Int, Int #) | Int #)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 }}}

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


More information about the ghc-tickets mailing list