
27 Sep
2022
27 Sep
'22
6:05 p.m.
On Mon, Sep 26, 2022 at 04:38:47PM -0400, Carter Schonwald wrote:
is there a good interface or something for Monads which guarantee tail calls are tail calls? (ideally via a stronger api assumption for tail position computations in a monad rather than "trustme" style api contracts)
*> is exactly for tail calls, isn't it? Consider its type (*>) :: m a -> m b -> m b It looks like it is saying that it doesn't need to save any of the context from the 'm a' call during evaluation of the 'm b' call, because the overall result is just the result of the 'm b' call. Is that what you were looking for, or was it something else? Tom