[Haskell-cafe] Class invariants/laws

Stuart Cook scook0 at gmail.com
Thu Oct 18 05:34:02 EDT 2007

On 10/18/07, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
> I don't believe GHC relies on any class laws.  It'd be pretty dangerous to do so, I think.

Incidentally, I consider it a slight infelicity that the H98 spec
doesn't seem to mention the implied laws of classes like Eq and Ord,
not even to disclaim responsibility for them.

Even if the standard doesn't require that the laws hold, I suggest
that it should at least state this explicitly, and perhaps recommend
that they be obeyed.

Is this something that might change in Haskell-Prime?


More information about the Haskell-Cafe mailing list