<div dir="ltr">Hi!<br><br>Regarding the "there can be no instance for which mapM is more efficient than traverse":<br>There have been issues with Applicative functions leaking memory where Monad ones aren't in Polysemy - some of these have been fixed, but it's not clear that there are none left.<br>There is also this claim in <a href="https://hackage.haskell.org/package/parser-combinators-1.2.1/docs/Control-Applicative-Combinators.html">parser-combinators</a>:<br><br>> <span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">Due to the nature of the</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><code style="color:rgb(0,0,0);font-size:13px;margin:0px;padding:0px;line-height:16.12px"><a href="https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Applicative.html#t:Applicative" title="Control.Applicative" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(171,105,84)">Applicative</a></code><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">and</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><code style="color:rgb(0,0,0);font-size:13px;margin:0px;padding:0px;line-height:16.12px"><a href="https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Applicative.html#t:Alternative" title="Control.Applicative" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(171,105,84)">Alternative</a></code><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">abstractions, they are prone to memory leaks and not as efficient as their monadic counterparts. Although all the combinators we provide in this module are perfectly expressible in terms of</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><code style="color:rgb(0,0,0);font-size:13px;margin:0px;padding:0px;line-height:16.12px"><a href="https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Applicative.html#t:Applicative" title="Control.Applicative" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(171,105,84)">Applicative</a></code><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">and</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><code style="color:rgb(0,0,0);font-size:13px;margin:0px;padding:0px;line-height:16.12px"><a href="https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Applicative.html#t:Alternative" title="Control.Applicative" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(171,105,84)">Alternative</a></code><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">, please prefer</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><a href="https://hackage.haskell.org/package/parser-combinators-1.2.1/docs/Control-Monad-Combinators.html" style="font-family:sans-serif;font-size:13px;margin:0px;padding:0px;text-decoration-line:none;color:rgb(171,105,84)">Control.Monad.Combinators</a><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">instead when possible.</span><br><br>I have not verified it, but it is a bit worrying.<br><br>Personally I would love to know of some kind of reasoning regarding these things, as I'm not aware of any! (efficiency of Applicative vs Monad based functions)<br><br><br>======<br>Georgi</div>