Are we even sure this law isn't already guaranteed by parametricity and perhaps the existing laws of the other type classes involved? I for one can't think of a pointed traversable which doesn't already obey this law.

On Aug 26, 2013 1:02 PM, "Henning Thielemann" <schlepptop@henning-thielemann.de> wrote:
There was a lot of discussion about separating "pure" from Applicative and putting it into a Pointed class. If I remember correctly, the main counter argument was that 'pure' alone does not satisfy interesting laws. There are only such laws in connection with the Applicative class.

Now, in some situations I liked to have a generalized unfoldr. I can build this from "pure" and "sequenceA" using the State monad:

unfoldr :: (Pointed t, Traversable t) => (s -> (a, s)) -> s -> t a
unfoldr = evalState . sequenceA . pure . state

One could state a law like:

   traverse f (pure a) == traverse id (pure (f a))

Would this justify to move "pure" into a new Pointed class?

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries