Sequentially zips this value with the specified one, discarding the first element of the tuple.
Sequentially zips this value with the specified one, discarding the second element of the tuple.
Sequentially zips this value with the specified one.
Feeds the value produced by this effect to the specified function, and then runs the returned effect as well to produce its results.
Maps the success value of this effect to the specified constant value.
Maps the error value of this effect to the specified constant value.
Simultaneously filters and maps the value produced by this effect.
Commits this transaction atomically.
Converts the failure channel into an Either
.
Filters the value produced by this effect, retrying the transaction until the predicate returns true for the value.
Feeds the value produced by this effect to the specified function, and then runs the returned effect as well to produce its results.
Flattens out a nested STM
effect.
Folds over the STM
effect, handling both failure and success, but not
retry.
Effectfully folds over the STM
effect, handling both failure and
success.
Returns a new effect that ignores the success or failure of this effect.
Maps the value produced by the effect.
Maps from one error type to another.
Converts the failure channel into an Option
.
Tries this effect first, and if it fails, tries the other effect.
Returns a transactional effect that will produce the value of this effect in left side, unless it fails, in which case, it will produce the value of the specified effect in right side.
Maps the success value of this effect to unit.
Same as filter
Named alias for <*>
.
Named alias for <*
.
Named alias for *>
.
Sequentially zips this value with the specified one, combining the values using the specified combiner function.
STM[E, A]
represents an effect that can be performed transactionally, resulting in a failureE
or a valueA
.Software Transactional Memory is a technique which allows composition of arbitrary atomic operations. It is the software analog of transactions in database systems.
The API is lifted directly from the Haskell package Control.Concurrent.STM although the implementation does not resemble the Haskell one at all. http://hackage.haskell.org/package/stm-2.5.0.0/docs/Control-Concurrent-STM.html
STM in Haskell was introduced in: Composable memory transactions, by Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy, in ACM Conference on Principles and Practice of Parallel Programming 2005. https://www.microsoft.com/en-us/research/publication/composable-memory-transactions/
See also: Lock Free Data Structures using STMs in Haskell, by Anthony Discolo, Tim Harris, Simon Marlow, Simon Peyton Jones, Satnam Singh) FLOPS 2006: Eighth International Symposium on Functional and Logic Programming, Fuji Susono, JAPAN, April 2006 https://www.microsoft.com/en-us/research/publication/lock-free-data-structures-using-stms-in-haskell/