[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:

And here is the last output from the runtime system:

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