Hey Isaac,
thats certainly an interesting approach, it seems like that solves it by reframing the question as "can you implement a loop/trampoline in the monad". It would be even cooler to have an approach that does proper tail calls i think ..


On Mon, Sep 26, 2022 at 8:15 PM Isaac Elliott <isaace71295@gmail.com> wrote:
https://pursuit.purescript.org/packages/purescript-tailrec/6.1.0/docs/Control.Monad.Rec.Class seems like a good starting point

On Tue, 27 Sept 2022, 6:39 am Carter Schonwald, <carter.schonwald@gmail.com> wrote:
Hello everyone!
a recent conversation I has having led to an interesting question: 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)

thx 
-Carter
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries