GHC 6.6 Data.Tuple incompatibility

Ashley Yakeley ashley at
Thu Oct 19 19:13:05 EDT 2006

John Goerzen wrote:
> On Thu, Oct 19, 2006 at 05:21:47PM -0400, Cale Gibbard wrote:
>> Why are you not using a proper type?
>> Define
>> data Command = Cmd String (CommandHandler, (String, String))
>> and there will be no problem making that an instance of Eq and Ord in
>> the way you described.
> Because Data.List.lookup worked easier with a tuple.

Well, if you need the tuple, you could do

   newtype Command = Cmd (String, (CommandHandler, (String, String)))

I agree with Cale and Ross: you should be using your own type if you 
want your own instance. This isn't a particularly compelling example for 
reverting to the 6.4 behaviour.

Ashley Yakeley

More information about the Libraries mailing list