Ryan Ingram <ryani.spam <at> gmail.com> writes:

> [...]
> 
> Here's another possible solution:
> 
> > newtype AsFunctor s a = AF { fstream :: (s a) }
> > instance (Stream f) => Functor (AsFunctor f) where
> >     fmap f (AF s) = AF (fmapStreamDefault f s)
> 
> Now to use fmap you wrap in AF and unwrap with fstream.
> 
> None of the existing solutions are really satisfactory, unfortunately.

Bulat Ziganshin <bulat.ziganshin <at> gmail.com> writes:

> http://haskell.org/haskellwiki/OOP_vs_type_classes may be useful
 
Many thanks to you both for the clarification and pointers.

cheers,
Roly



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to