1. 6

  2. 1

    This does a good job of motivating what non-Haskellers, and non-compiler-authors, will see as a very esoteric design question. It also was interesting to follow the details, though it was a substantial time investment.

    Since Haskell doesn’t (and can’t) enforce typeclass laws, which are informal mathematical identities that exist only in the documentation, it has always seemed unusual that there are important typeclasses which don’t make a lot of sense without understanding the laws. To say nothing of the occasional author who pretty much breaks everything by ignoring them, like when blaze-html (I think, but apologize if it was something else) had a Monad instance which wasn’t a monad at all, purely so that it could misuse do-notation, which required that.

    I feel like there’s a design issue which the language is inadequately addressing, and laws are an attempt to patch around it. I don’t have a suggestion, just…