-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Control.Monad.STM.Class #23
base: master
Are you sure you want to change the base?
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.Class
that exposes aMonadSTM
type class and instances forSTM
andIO
. I lifted the haddocks directly fromMonadIO
.