[Haskell-beginners] Issue with MultiParamTypeClasses

Ovidiu Deac ovidiudeac at gmail.com
Tue Dec 8 07:20:19 UTC 2015


Indeed, with newtype it works like a charm. Thanks!

On Sun, Dec 6, 2015 at 8:26 PM, Marcin Mrotek <marcin.jan.mrotek at gmail.com>
wrote:

> Hello,
>
> This is not an issue with MultiParamTypeClasses. It's just that type
> synonyms always have to be used fully applied. You can use a newtype
> instead:
>
> newtype AdjList a = AdjList [(a,[a])]
>
> instance Graph AdjList Int where
>   (...)
>
> Best regards,
> Marcin Mrotek
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151208/45884918/attachment.html>


More information about the Beginners mailing list