Pointed [Re: 2014 Applicative => Monad proposal]
Andreas Abel
andreas.abel at ifi.lmu.de
Fri May 24 20:15:13 CEST 2013
Pointed is a superclass of Applicative, taking the role of pure, but not
related to Functor. I do not see the problem.
On 24.05.2013 19:59, Dan Doel wrote:
> Where is Pointed supposed to live in the hierarchy? For instance,
> someone mentioned Set. But Set is not eligible to have a Functor instance.
>
> So do we just have Pointed type functions that aren't necessarily
> Functors? And if they are Functors/Applicatives/Monads they're supposed
> to behave nicely?
>
> And if not, then several collections are excluded from being Pointed,
> and I'm not entirely sure which collections you're using. Just many
> different sequence types?
>
>
> On Fri, May 24, 2013 at 1:02 PM, Andreas Abel <andreas.abel at ifi.lmu.de
> <mailto:andreas.abel at ifi.lmu.de>> wrote:
>
> I do not use Pointed a lot, but a situation where it comes natural
> is when I want to emit elements into a collection f. Then I need
>
> Pointed f -- to emit a single element
> Monoid (f a) -- to join two collections
>
> Using Applicative or Monad is overdoing it.
>
> Maybe you have a better suggestion how to organize my task which I
> have not considered yet...
>
> Cheers, Andreas
>
> On 24.05.2013 17 <tel:24.05.2013%2017>:28, Roman Cheplyaka wrote:
>
> I completely agree with Edward here.
>
> * Edward Kmett <ekmett at gmail.com <mailto:ekmett at gmail.com>>
> [2013-05-24 11:20:51-0400]
>
> For the record I'm actually -1 on including Pointed.
>
> My experience is that there are very few uses for the class
> that permit you
> to reason about your code without one-off ad hoc reasoning
> based on the
> particular instance you are given. Now, the Apply and Bind
> classes on the
> other hand... =) Though, to be fair, I couldn't seriously
> propose including
> either of those, either. Even I can't be bothered to
> instantiate them all
> the time!
>
> -Edward
>
>
> On Fri, May 24, 2013 at 11:13 AM, Andreas Abel
> <andreas.abel at ifi.lmu.de
> <mailto:andreas.abel at ifi.lmu.de>>__wrote:
>
> +1 AMP
> +1 MINIMAL
> +1 Pointed in base
>
>
> --
> Andreas Abel <>< Du bist der geliebte Mensch.
>
> Theoretical Computer Science, University of Munich
> Oettingenstr. 67, D-80538 Munich, GERMANY
>
> andreas.abel at ifi.lmu.de <mailto:andreas.abel at ifi.lmu.de>
> http://www2.tcs.ifi.lmu.de/~__abel/ <http://www2.tcs.ifi.lmu.de/~abel/>
>
> _________________________________________________
> Libraries mailing list
> Libraries at haskell.org <mailto:Libraries at haskell.org>
> http://www.haskell.org/__mailman/listinfo/libraries
> <http://www.haskell.org/mailman/listinfo/libraries>
>
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.abel at ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
More information about the Libraries
mailing list