[Haskell-cafe] Retrospective type-class extension

Stephen Tetley stephen.tetley at gmail.com
Thu May 20 17:00:42 EDT 2010


On 20 May 2010 13:10, Miguel Mitrofanov <miguelimo38 at yandex.ru> wrote:
> That won't be a great idea; if I just want my monad to be declared as one, I
> would have to write
>
> instance Functor MyMonad where fmap = ...
> instance Pointed MyMonad where pure = ...
> instance Applicative MyMonad where (<*>) = ...
> instance Monad MyMonad where join = ...
>


There are also some Monads where a Functor instance wouldn't add
anything useful, Andy Gill's Dot monad is one (Text.Dot), Oleg
Kiselyov's RenderMonad in the CSXML library is another.


More information about the Haskell-Cafe mailing list