Comparing TRex records

Lajos Nagy <[email protected]> Wed, 18 Jan 2006 16:28:25 -0500 (EST)
Newsgroups gmane.comp.lang.haskell.hugs.user
Message-ID <[email protected]>
Hi,

I tried to create a set of records using Data.Set but it turns out that 
Rec doesn't implement Ord.  Is there a nice solution or you need a new 
builtin function to do the trick?

Sample code:

Main> Data.Set.mkSet [(a="apple"), (a="peach")]
ERROR - Unresolved overloading
*** Type       : Ord (Rec (a :: [Char])) => Set (Rec (a :: [Char]))
*** Expression : mkSet [(a = "apple"),(a = "peach")]

If a new builtin is needed, any pointers where to start?

Thanks and Regards,

Lajos Nagy
Computer Science Ph.D. Student
Florida Institute of Technology