Lazy minimum

Chung-chieh Shan ccshan at
Fri Nov 21 09:06:17 EST 2008

Dave Bayer <bayer at> wrote in article <CE720B3D-32CD-4A75-9D3D-0821AACD9490 at> in gmane.comp.lang.haskell.glasgow.user:
> 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) (Section 4.6)

It might also help to use discriminators instead of Ord for comparison:

Edit this signature at
2008-11-20 Universal Children's Day    
1948-12-10 Universal Declaration of Human Rights

More information about the Glasgow-haskell-users mailing list