[GHC] #15367: Misleading error message when unboxed tuples used in sums without -XUnboxedTuples
GHC
ghc-devs at haskell.org
Thu Jul 12 11:34:37 UTC 2018
#15367: Misleading error message when unboxed tuples used in sums without
-XUnboxedTuples
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
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:
-------------------------------------+-------------------------------------
{{{
$ cat lib.hs
{-# LANGUAGE UnboxedSums #-}
module Lib where
type Foo = (# (# Int, Int #) | Int #)
$ ghc lib.hs
[1 of 1] Compiling Lib ( lib.hs, lib.o )
lib.hs:5:1: error:
• Illegal unboxed tuple type as function argument: (# Int, Int #)
• In the type synonym declaration for ‘Foo’
|
5 | type Foo = (# (# Int, Int #) | Int #)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}}}
But there's nothing illegal about this type, we just need to enable
`UnboxedTuples`. The error message is misleading.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15367>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list