Prev Next

The STM Monad

 data STM a
 instance Monad STM
 throw :: Exception -> STM a
 catch :: STM a -> (Exception->STM a) -> STM a
 atomic :: STM a -> IO a
 retry :: STM a
 orElse :: STM a -> STM a -> STM a
 data TVar a
 newTVar :: a -> STM (TVar a)
 readTVar :: TVar a -> STM a
 writeTVar :: TVar a -> a -> STM ()
25