
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
mailto:lemming@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@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@gu.se http://www2.tcs.ifi.lmu.de/~abel/