runST does not prevent resources from escaping
9 points by abhin4v
9 points by abhin4v
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/
Summary: runST does not prevent resources from escaping, but it does prevent escaped resources from being used.
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.