[Hugs-users] Comparing TRex records

Lajos Nagy lnagy at fit.edu
Wed Jan 18 16:28:25 EST 2006


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



More information about the Hugs-Users mailing list