On 06/25/2014 05:54 AM, Rafael Almeida wrote:The compiler makes no assumption (at least that I know of) that laws are
> Hello,
>
> You guys have been great taking my questions. Thank you. Now I have another
> one :)
>
> What can go wrong if I make an Monad instance but don't follow Monad rules
> (identity and associativity)? Sure it would be misleading for someone using
> the non-conforming class. They may make code that assume those laws,
> although they don't hold. However, could it make the compiler generate bad
> code
followed. It should never generate ‘bad’ code (whatever that might mean)
anyway.