Open treeowl opened 6 years ago
Even if we really do need concurrency variables here for some reason, we can at least generate the uniques in a more performant way. Atomically reading and incrementing a counter should be cheaper than mucking about with an MVar
.
This is code written 10 years ago. I can't remember. However, if it can be rewritten using StateT, then all power to you. I'm happy reviewing changes, and there are already tests that can be used.
It's not at all obvious to me why we need
MVar
s here. Why not just useStateT
to handle the state of the computation? Is there some way formapDeRef
to exploit this through concurrency or lazyIO
? If so, that should be documented. If not, let's simplify them away.