Warning when deriving Foldable/Traversable using -Wall
Herbert Valerio Riedel
hvriedel at gmail.com
Wed Oct 8 12:05:45 UTC 2014
On 2014-10-08 at 14:00:05 +0200, Alan & Kim Zimmerman wrote:
[...]
> Should this go into Trac?
Fwiw, there is a version "7.9" you can select when writing a Trac ticket
for the very purpose to file bugs against GHC HEAD.
[...]
> The file being compiled is
>
> --------------------------------------------
> {-# LANGUAGE DeriveTraversable #-}
>
> module T9069 where
>
> import Data.Foldable
> import Data.Traversable
>
> data Trivial a = Trivial a
> deriving (Functor,Foldable,Traversable)
> ---------------------------------------------
There's two simple ways to workaround this;
either
a) add a 'import Prelude' after the two imports
or
b) remove the two imports
The a) option has the benefit that it will still work with GHC 7.8.3
More information about the ghc-devs
mailing list