A simple question, I hope: The binary
package defines two types, Get
and Put
. The former is essentially a state monad, and the latter is essentially a writer. Both state and writer have reasonable MonadFix
instances, so I'd expect that Get
and Put
also would.
Get
does. Put
doesn't. So, is it possible to define an appropriate MonadFix
instance for Put
(really for PutM
)?
A more general question is: how does one normally verify that a typeclass instance actually satisfies the laws of that typeclass?