[Haskell-beginners] newtype with a typclass

Răzvan Rotaru razvan.rotaru at gmail.com
Mon Mar 18 16:43:10 CET 2013


Hi,

It seems that type constructors don't allow usage of typeclasses. Is it not
possible to create polymorphic types in Haskell by declaration?

For example I want a map with String keys and anything that is Showable as
values:

newtype MyMap = Map String Show

How can I do that?

Thanks,
Razvan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130318/e7fbb1e9/attachment.htm>


More information about the Beginners mailing list