runST does not prevent resources from escaping

9 points by abhin4v


ocramz

Would the second example be fixed by using linear arrows (%1-> ) instead of the regular ones ? Edit: seems so, though I haven't tried with what's currently in GHC https://www.tweag.io/blog/2021-02-10-linear-base/

tome

Summary: runST does not prevent resources from escaping, but it does prevent escaped resources from being used.

dubiouslittlecreature

You know what. It’s nearly 2026. Why am I explaining this when you could ask an LLM. (This is ChatGPT. I’ll spare you the rambling)

Because I’m never going to “ask” an LLM and I read blog posts for human writing, not plagiarism.

This is disrespectful as hell to anyone with standards.