[Haskell-cafe] deriving Data.HashTable - stack overflow

Lyle Kopnicky lists at qseep.net
Thu Aug 8 18:22:45 CEST 2013

Hi folks,

In GHC 7.6.3, the base Data.HashTable is deprecated, so I installed the
hashtables package. In order to work on your datatype, you need an instance
of Data.Hashable.Hashable.

So I went to the Data.Hashable page and looked up examples on how to derive
a Hashable instance for my datatype:

The problem occurs even when using the sample code on the page:

{-# LANGUAGE DeriveGeneric #-}

 import GHC.Generics (Generic)
 import Data.Hashable

 data Colour = Red | Green | Blue
               deriving Generic

 instance Hashable Colour

If I then type `hash Red` I get a stack overflow.

I am using the Haskell Platform, so I have hashable-, but I notice
the docs are for hashable- If I install though, other
code in my project breaks - seems like one part doesn't recognize the
instances from another part. So I'll stick with the platform version.

I am running the 32-bit Windows GHC 7.6.3. Haskell Platform 2013.2.0.0.

Any thoughts?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130808/e727924c/attachment.htm>

More information about the Haskell-Cafe mailing list