[Haskell-cafe] Restricted type classes

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Sep 5 10:19:35 EDT 2010


On 6 September 2010 00:11, Sebastian Fischer
<sebf at informatik.uni-kiel.de> wrote:
>>> Just because we don't have
>>> a use now doesn't mean it might not be useful in the future.
>
> I am suspicious about complicating a design for potential future benefits.
>
> However, difference lists provide an example of a type that support Pointed
> more naturally than Applicative: the dlist package [1] provides Applicative
> and Monad instances but only by converting to normal lists in between.
>
> Note that even fmap cannot be defined without converting difference lists to
> normal lists in between. The natural interface to difference lists would be
> Pointed (without a Functor superclass) and Monoid.

Hmmm.... is there any reason for Functor to be a superclass of
Pointed?  I understand Functor and Pointed being superclasses of
Applicative (which in turn is a superclass of Monad), but can't see
any relation between Pointed and Functor...

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list