[GHC] #8204: Impossible when deriving Read for empty data declaration
GHC
ghc-devs at haskell.org
Fri Aug 30 22:13:51 UTC 2013
#8204: Impossible when deriving Read for empty data declaration
------------------------------------+-------------------------------------
Reporter: tinctorius | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
Remember #4302?
Me:
{{{
data X deriving Read
main :: IO ()
main = return ()
}}}
GHC:
{{{
[1 of 1] Compiling Main ( deriving.hs, deriving.o )
deriving.hs:2:17:
Can't make a derived instance of `Read X':
`X' must have at least one data constructor
Possible fix: use a standalone deriving declaration instead
In the data declaration for `X'
}}}
Me:
{{{
-- Ugh, fine...
{-# LANGUAGE StandaloneDeriving #-}
deriving instance Read X
main :: IO ()
main = return ()
}}}
GHC:
{{{
[1 of 1] Compiling Main ( deriving.hs, deriving.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-unknown-linux):
Prelude.foldr1: empty list
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
And so I did.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8204>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list