Proposal: add liftA4 and liftA5 to match liftM4 and liftM5
Andreas Abel
abela at chalmers.se
Fri Nov 7 10:16:55 UTC 2014
Agreed. I never use liftMx or liftAx and when I see them in old code, I
replace them by <$> and <*>.
Anyway, I like the proposal best that changes to constraint on liftM to
Applicative, and leaves everything else alone.
I hope the same happens for sequence, mapM and the like!
sequence :: (Applicative m) => [m a] -> m [a]
sequence = foldr (\ x xs -> (:) <$> x <*> xs) (pure [])
On 06.11.2014 11:04, Michael Snoyman wrote:
>
>
> On Thu, Nov 6, 2014 at 11:50 AM, Henning Thielemann
> <lemming at henning-thielemann.de <mailto:lemming at henning-thielemann.de>>
> wrote:
>
>
> On Thu, 6 Nov 2014, Michael Snoyman wrote:
>
> David: I think the resistance you're seeing is coming from the
> fact that- at least in my experience- liftMN
> is not considered good, idiomatic Haskell code,
>
>
> Who does not consider it good or idiomatic and why? Lifting things
> through some stages of types is a common thing in Haskell, or not?
>
>
> I wasn't talking about lifting as a general concept, I was comparing to
> <$> and <*>. From what I've seen of Haskell code in general, people use
> the operators far more often, and tend to recommend them to new users.
>
> Michael
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden
andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/
More information about the Libraries
mailing list