[Haskell-cafe] How to define instance for type synonym with parameter.

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon Mar 15 17:40:31 EDT 2010


Vasyl Pasternak <vasyl.pasternak at gmail.com> writes:
> Could anyone tell me what is going on, and how to declare SomeMonad as
> instance of Applicative ?

You can't, because you can't define new instances for type aliases.  If
you really want SomeMonad to have a custom instance, define it as a
newtype.



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list