Strictness of library implementations
The library report says The code found here is a specification, rather than an implementation. Implementations may choose more efficient versions of these functions. However, all properties of these specifications must be preserved, including strictness properties. Ratio then defines data (Integral a) => Ratio a = !a :% !a which GHC seems to implement as specified, but nhc and hugs seem to use data (Integral a) => Ratio a = a :% a Does this not have different strictness properties? Thanks Ian
Ratio defines data (Integral a) => Ratio a = !a :% !a which GHC seems to implement as specified, but nhc and hugs seem to use data (Integral a) => Ratio a = a :% a Does this not have different strictness properties?
It does. In nhc98's case, this is simply an oversight - i.e. a bug. Regards, Malcolm
participants (2)
-
Ian Lynagh -
Malcolm Wallace