[Haskell-cafe] STM: "nested atomically" error

Johan Brinch brinchj at gmail.com
Thu Jan 12 13:48:03 CET 2012


Hi all,

I'm seeing the "Control.Concurrent.STM.atomically was nested" error,
but I just can't figure out what's happening. I'm not using any unsafe
IO (only for debug printing), and the test program is only running one
thread. Where is a transaction being nested?

What are the scenarios where this error is reported?

The behaviour is consistent on GHC 7.4.0 RC and GHC 7.2.2 (stable).

That function that's being run can be found here:
https://gist.github.com/30b94760abc27b05ec7c

And here is the last output from the runtime system:
https://gist.github.com/4356ae541895becb4169


Any ideas to track this down will be greatly appreciated!

--
Johan Brinch,
Dept. of Computer Science,
University of Copenhagen



More information about the Haskell-Cafe mailing list