Noting that these are values in a list, I would expect that [TVar (Maybe Ghost)']
is the correct type--that is, a list of TVar
s--and that you have [STM (TVar (Maybe a0))']
instead because you're creating a list of STM
actions that would create TVar
s, but not actually using that inside a transaction.
So, wherever you have that list of TVar
-creating actions, you'll want to do something like sequence
to turn that into STM [(TVar (Maybe a0))']
, a single action that creates a list of TVar
s, then either bind that inside a transaction (i.e., using <-
instead of let
) or use atomically
as well to create the TVar
s in IO
. Either way, the result of binding that value will be the list of TVar
s that you probably want.