Why is there no monad instance for Control.Applicative.Const? Is following definition correct, or violates it the monad laws?
instance Monoid a => Monad (Const a) where
return _ = Const mempty
(Const x) >>= _ = Const x
And can you think of any useful application?
It violates the left identity law:
return x >>= fmust be the same asf x, but considerf x = Const (x + 1).