#8929 closed bug (invalid)

Deriving Generics broken

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by hvr)

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.

Change History (6)

comment:1 follow-up: Changed 13 months ago by dreixel

What is the error message that you get?

comment:2 Changed 13 months ago by kosmikus

I cannot reproduce this (with binary-0.7.1.0). Additionally, it also seems to work with 7.8.1-rc2.

comment:3 in reply to: ↑ 1 Changed 13 months ago by guest

Replying to dreixel:

What is the error message that you get?

during the compilation, I get the WARNING:

No explicit method or default declaration for `put'
    In the instance declaration for `Binary Foo'

When running the (decode . encode $ Foo), I get the EXCEPTION:

No instance nor default method for class operation Data.Binary.get
Last edited 13 months ago by hvr (previous) (diff)

comment:4 Changed 13 months ago by hvr

  • Description modified (diff)

(fixed up Wiki markup)

comment:5 Changed 13 months ago by dreixel

I've just built GHC 7.6.3 with 7.6.3 (x86 linux), but I cannot reproduce this.

comment:6 Changed 13 months ago by hvr

  • Resolution set to invalid
  • Status changed from new to closed

After talking to OP, I'm closing this as this was most likely caused by a broken installation/pkg-db

Note: See TracTickets for help on using tickets.