Timothy Robin BARBOUR writes:
>
> Also, the module below (my attempt to clean up Hash.hs) produces this
> warning when compiled with ghc-3.01:
>
> Hash.hs:1: Warning: `Hashable' mentioned 3 times in export list
>
> I thought this one had been fixed, but now it seems to be growing.
>
...
> module Hash (
> Hashable, hash, prehash, addHash, maxPrime64k
> ) where
...
> class Hashable a where
> hash :: Integer -> a -> Integer
> prehash :: Integer -> a -> Integer
> hash m = flip mod m . prehash m
> prehash = hash
>
That's a slightly odd looking export list, exporting the class and its
members separately. The code that checks for export duplicates just uses
the name of the class when checking the export of a class method -
hence the warning about Hashable being exported three times.
Fixed in the next release - export class methods through the class (i.e.,
"Hashable(hash, prehash)") if you want to avoid the warning with 3.01.
--Sigbjorn