
#8929: Deriving Generics broken -------------------------------------+---------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+---------------------------------- Old description:
I load the following code into ghci:
== {-# LANGUAGE DeriveGeneric #-}
import GHC.Generics import Data.Binary
data Foo = Foo deriving (Show, Generic)
instance Binary Foo ==
Then I execute:
(decode . encode $ Foo) :: Foo
In 7.6.3 (stage 2 booted 7.6.3), I get an error.
In 7.6.3 (stage 2 booted 7.6.2), the desired result "Foo" is shown.
New description: I load the following code into ghci: {{{#!hs {-# LANGUAGE DeriveGeneric #-} import GHC.Generics import Data.Binary data Foo = Foo deriving (Show, Generic) instance Binary Foo }}} Then I execute: {{{#!hs (decode . encode $ Foo) :: Foo }}} In 7.6.3 (stage 2 booted 7.6.3), I get an error. In 7.6.3 (stage 2 booted 7.6.2), the desired result "Foo" is shown. -- Comment (by hvr): (fixed up Wiki markup) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8929#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler