-
Notifications
You must be signed in to change notification settings - Fork 17
Description
examples/src/main/scala/eg/FreeSTM.scala
Line 10 in ab444af
| * Pure functional STM using a free monad to hide the underlying Scala STM. Refs and transaction |
Hello, I'm curious if this is actually a real STM. I see atomic evaluation, but I don't see conflicts resolving. Not sure if the behavior of real STM holds here. Could you please clarify?
I found the same approach to STM with Free monads independently and then googled your code, but my STM follows the straightforward definition of STM and thus can be considered well-behaving:
https://github.com/graninas/stm-free
Also, it differs from other STMs by declaring a context explicitly. This is good because many optimizations can utilize some additional knowledge came with different contexts. Also, you can have separate "clusters" of independent STM models.
I'm still working on the library, so you might find it not that rich and mature as original Haskell's STM.