Hi list,
miszero :: m a -> Bool
It tests if the provided monad instance is empty. My naive attempt was:
miszero :: (Eq (m a), MonadPlus m) => m a -> Bool
miszero = ( == mzero )
This works, but not correctly. It adds an Eq constraint that is unneeded. I would prefer to have something like:
miszero :: MonadPlus m => m a -> Bool
Because I am not comparing the contents of the monad. I don't even touch it. Is this possible to write?
with kind regards,
Edgar