
20 Mar
2006
20 Mar
'06
3:18 p.m.
"Geest," == Geest, G van den
writes:
Geest,> I suppose you want to define compareEntries like this:
compareEntries (Entry x) (Entry y) = compareEntries x y
Geest,> An option is to just implement it the following way Geest,> (Haskell98!):
class DatabaseEntry e where entryLabel :: e -> String formatEntry :: e -> String compareEntries :: e -> e -> Ordering
data Entry a = Entry a
No. I don't want that. The database parsing function returns Map.Map String Entry but entries can of different types (and these type vary over styles). -- WBR, Max Vasin.