Hi,
I´m trying to make a searchable transactional cache using STM. The
whole idea is to use indexed TVar variables using a FiniteMap. another
TVar holds the finitemap . This last TVar has to be a global variable.
I found that when handled as global, a TVar does not keep the state.
For example:
Alberto G. Corona [EMAIL PROTECTED] writes:
stmcache= newTVar 0
I will explain what this doesn't with an analogy.
import Data.IORef
notglobal = newIORef True
main = do a - notglobal
b - notglobal
writeIORef a False
x - readIORef b
print x
To better