GHC 6.6 Data.Tuple incompatibility

John Goerzen jgoerzen at
Thu Oct 19 15:21:37 EDT 2006


I had this code that worked in GHC 6.4:

type CommandHandler = FTPServer -> String -> IO Bool
type Command = (String, (CommandHandler, (String, String)))

instance Eq Command where
    x == y = (fst x) == (fst y)
instance Ord Command where
    compare x y = compare (fst x) (fst y)

I am compiling with overlapping instances set.

In GHC 6.6, this gives an error that Eq Command is a duplicate instance
of one defined in Data.Tuple.  Commenting out that instance causes the
Ord Command instance to fail because there is no Eq instance for

After discussing it with Ian Lynagh, his conclusion was that the problem
is that Data.Tuple was not compiled with overlapping instances support,
and that it probably ought to be.  He asked me to post here to see if
everyone else felt the same way.


-- John

More information about the Libraries mailing list