
19 Oct
2006
19 Oct
'06
7:13 p.m.
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