Bug in the documentation of (<**>)

Eric Mertens emertens at gmail.com
Mon Sep 11 15:42:27 UTC 2017


Elaborating the documentation of (<**>) is a good idea.

I’m not sure how to describe this definition’s behavior in English prose, but this seems like a case where inlining the definition in the documentation would be quite helpful to the haddock reader.

The documentation for (<*>) and friends is written in terms of sequencing actions, so we could write: A variant of (<*>) where the “argument" is sequenced before the “function”.

It’s obviously tricky to describe what’s going on because we aren’t actually dealing with function application, we’re just matching up the types of function application.

> On Sep 11, 2017, at 7:51 AM, Wolfgang Jeltsch <wolfgang-it at jeltsch.info> wrote:
> 
> Hi!
> 
> The documentation of (<**>) says: “A variant of <*> with the arguments
> reversed.” In my opinion, this means that (<**>) = flip (<*>). However,
> this is not true, since (<**>) does not change the order of effects. The
> actual definition of (<**>) is a <**> f = liftA2 (\ x h -> h x) a f.
> Could this please be fixed?
> 
> All the best,
> Wolfgang
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries



More information about the Libraries mailing list