I've recently started using STM for some bits in a project of mine, but I'm having trouble figuring out how to test it.
I have no IO in these functions and was hoping I could write QuickCheck properties to test things, but "atomically" (STM a -> IO a) seems to be the only way to get anything out of the STM monad.
Is this possible, or should I just write my tests in HUnit instead?
You can test IO actions with quickcheck: http://hackage.haskell.org/packages/archive/QuickCheck/2.4.1.1/doc/html/Test-QuickCheck-Monadic.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With