How does that work in Haskell? Is the user of a semigroup somehow guaranteed that its operation is associative?
As it is, it works more or less exactly like interfaces from other languages. When you implement Comparable in Java you implicitly expect certain laws (ie that it's a valid ordering), but there is also no way to specify or verify them.