GHC 6.6 Data.Tuple incompatibility

Ross Paterson ross at soi.city.ac.uk
Thu Oct 19 18:39:54 EDT 2006


On Thu, Oct 19, 2006 at 02:21:37PM -0500, John Goerzen wrote:
> 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.

On Thu, Oct 19, 2006 at 04:27:57PM -0500, John Goerzen wrote:
> [...], but this is a regression from GHC 6.4.

It's a change, but that's a risk one takes when using experimental
features.  Personally, I think it's an improvement: no longer can
standard instances change because I've imported a module that happens
to use overlapping instances.



More information about the Libraries mailing list