
Dave Bayer
So to summarize the responses, there's no GHC language support for introspecting lazy structures, allowing one to write a generic bounded compare that only evaluates lazy structures to a specified depth. One can however write a class, and solve this problem type-by-type with a common interface.
You might like how Lazy SmallCheck does it (then again, maybe not) http://www.cs.york.ac.uk/fp/smallcheck/smallcheck.pdf (Section 4.6) It might also help to use discriminators instead of Ord for comparison: http://portal.acm.org/citation.cfm?id=1411220 -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig 2008-11-20 Universal Children's Day http://unicef.org/ 1948-12-10 Universal Declaration of Human Rights http://everyhumanhasrights.org