Skip to content
Snippets Groups Projects
Commit ecac867e authored by Jens Nolte's avatar Jens Nolte
Browse files

Add noRetry and noThrow


Co-authored-by: default avatarJan Beinke <git@janbeinke.com>
parent d8a36f26
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ module Control.Concurrent.STM.Class ( ...@@ -18,6 +18,8 @@ module Control.Concurrent.STM.Class (
NoThrow, NoThrow,
MonadSTM'(..), MonadSTM'(..),
runSTM', runSTM',
noRetry,
noThrow,
unsafeLimitSTM, unsafeLimitSTM,
retry, retry,
...@@ -157,6 +159,12 @@ instance (MonadSTM' r t m, Monoid w) => MonadSTM' r t (RWST rd w s m) where ...@@ -157,6 +159,12 @@ instance (MonadSTM' r t m, Monoid w) => MonadSTM' r t (RWST rd w s m) where
runSTM' :: STM' r t a -> STM a runSTM' :: STM' r t a -> STM a
runSTM' (STM' fn) = fn runSTM' (STM' fn) = fn
noRetry :: STM' NoRetry t a -> STM' r t a
noRetry (STM' f) = (STM' f)
noThrow :: STM' r NoThrow a -> STM' r t a
noThrow (STM' f) = (STM' f)
unsafeLimitSTM :: (MonadSTM' r t m) => STM a -> m a unsafeLimitSTM :: (MonadSTM' r t m) => STM a -> m a
unsafeLimitSTM fn = liftSTM' (STM' fn) unsafeLimitSTM fn = liftSTM' (STM' fn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment