Conal Elliott wrote:
> The type argument I ran into trouble with represents a value as a list
> of increasing lower bounds, ending in the exact value.  min produces
> lower bounds from lower bounds and so is immediately productive before
> even knowing which argument is the lesser one. 

Is this only a matter of efficiency? Can it be compared with a faster
equality check that does not need to evaluate terms always, because it
compares the internal pointers first (and returns True for equal ones)?

Cheers Christian

P.S. Maybe it is still a good idea to have a separate user defined class
 Min for your purpose, because then you don't have to hand-write compare
functions, but then I don't know the nesting of your data types, though
a generic instance Ord a => Min a may help.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to