[Haskell-cafe] Removing polymorphism from type classes (viz.
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
> > 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:
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.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,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe