<div dir="auto"><div>Interesting. There seem to be quite a few of these.</div><div dir="auto"><br></div><div dir="auto">const id (Identity x) (Identity y) = Identity y = liftA2 (const id) (Identity x) (Identity y)</div><div dir="auto"><br></div><div dir="auto">If m is occlusive, so is ReaderT e m:</div><div dir="auto"><br></div><div dir="auto">liftA2 (const id) (ReaderT f) (ReaderT g) = ReaderT $ \r -> liftA2 (const id) (f r) (g r) = ReaderT $ \r -> g r = ReaderT g</div><div dir="auto"><br></div><div dir="auto">I believe this works for StateT as well. The first counterexample is Writer w for a non-trivial monoid w.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Nov 10, 2020, 6:23 PM Kim-Ee Yeoh <<a href="mailto:ky3@atamo.com">ky3@atamo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">By an occult effect I mean that under the type signature (M a -> M b -> M b) of a particular monad M, the two expressions (const id) and (liftM2 $ const id) are equivalent.</div><div dir="auto"><br></div><div dir="auto">Occult here refers to how the effect of the second parameter blocks the effect of the first one.</div><div dir="auto"><br></div><div dir="auto">In your opinion, is there a better word than occult to describe the property of such monads?</div>-- <br><div dir="ltr" data-smartmail="gmail_signature">-- Kim-Ee</div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div></div>