Conversation
|
Whoops, just realized that the |
|
This is ready to go aside from the documentation nit. If anyone has advice on how we might want to re-word this (or not) I'm all ears: -- | Monads in which 'STM' computations may be embedded.
-- Any monad built by applying a sequence of monad transformers to the
-- 'STM' monad will be an instance of this class.
--
-- Instances should satisfy the following laws, which state that 'liftSTM'
-- is a transformer of monads:
--
-- * @'liftSTM' . 'return' = 'return'@
--
-- * @'liftSTM' (m >>= f) = 'liftSTM' m >>= ('liftSTM' . f)@ |
|
What's the issue specifically? |
|
Oh, just that for IO monads, liftSTM wraps a transaction, so it seems odd to suggest that |
|
Should there even be an |
|
I definitely agree that the |
5ab34a9 to
9c8a30c
Compare
|
Removed =) |
|
@simonmar, any objection to merging this? |
|
What's the plan for providing instances for |
no objections. Needs updating to resolve conflicts though. |
Addresses #22
This patch adds a new module
Control.Monad.STM.Classthat exposes aMonadSTMtype class and instances forSTMandIO. I lifted the haddocks directly fromMonadIO.