Functor => Pointed => Applicative => Monad
John Lato
jwlato at gmail.com
Tue Nov 30 11:31:17 CET 2010
>
> From: David Menendez <dave at zednenem.com>
> Subject: Re: Functor => Pointed => Applicative => Monad
> To: Isaac Dupree <ml at isaac.cedarswampstudios.org>
> Cc: libraries at haskell.org
> Message-ID:
> <AANLkTinkqQXYTN6ATqGawbdeVvtfq_6z51sADN8i_O8P at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Nov 29, 2010 at 11:26 AM, Isaac Dupree
> <ml at isaac.cedarswampstudios.org> wrote:
> > On 11/29/10 03:39, John Smith wrote:
> >>
> >> Is there any intention to reorganise the standard class hierarchy,
> >> arranging them logically instead of in order of invention? I plagiarised
> >> the following example from
> >> http://stackoverflow.com/questions/1634911/can-liftm-differ-from-lifta
> >> and Trac:
> >>
> >> class Functor f where
> >> map :: (a -> b) -> f a -> f b
> >>
> >> class Functor f => Pointed f where
> >> pure :: a -> f a
> >
> > Is it useful to have Pointed non-Functors?
>
> Is Pointed useful at all? The last time this discussion came up, I
> asked for algorithms which were generic over pointed functors (in the
> same way that traverse is generic over applicative functors) and no
> one could think of any.
>
It's useful for 'singleton' on probabilistic data structures (e.g. a Bloom
filter).
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20101130/ecd4192d/attachment.html
More information about the Libraries
mailing list