On 10/17/07, Janis Voigtlaender <[EMAIL PROTECTED]> wrote:
> Okay, it is quite natural to take this stand. But as you say, there is
> no such commitment in the language definition. And even if there were, I
> doubt it would be possible to enforce such invariants in a compiler. So
> there would be "illegal" programs that are nevertheless accepted by the
> compilers. Not what we want, do we, in Haskell land?

These invariants are basically impossible to enforce by the compiler,
but nonetheless certain classes have laws which are expected to hold,
and I would not be surprised if (for example) GHC optimization RULES
depended on them.  For example, there's no way to enforce that the
implementation of >>= is associative, but it's nonetheless stated in
the description of Monad and code assumes it to be true.

  -- ryan
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to