[Haskell-cafe] Removing polymorphism from type classes (viz. Functor) (Again)

Alexey Karakulov ankarakulov at gmail.com
Sat Aug 14 15:16:52 EDT 2010


On Sat, Aug 14, 2010 at 2:27 PM, Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:

> Alexey Karakulov <ankarakulov at gmail.com> writes:
>
>
> > (Ord b) must be deduced from (Functor (Set b)) but it doesn't. I don't
> know
> > whether it's my mistake somewhere or ghc problem.
>
> I've come across this problem as well; the best solution I've seen so
> far is the one taken by Ganesh in his rmonad library:
> http://hackage.haskell.org/package/rmonad
>
> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> IvanMiljenovic.wordpress.com
>

Thanks for the link, but RFunctor typeclass is still (more or less)
polymorphic, so I couldn't write ByteString instance for it. (Really I don't
care about ByteString, but it's good example). However, I could try to use
Suitable+Constraints concept for non-polymorphic functors.

-- 
All the best,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100814/08f49c85/attachment.html


More information about the Haskell-Cafe mailing list