
9 Apr
2008
9 Apr
'08
8:52 p.m.
Bryan O'Sullivan
Pete Kazmier wrote:
data ArrayBlockingQueueSTM e = ArrayBlockingQueueSTM { [...] sa :: Array Int (TVar e) }
It's unclear to me why the Array's elements must be wrapped in TVars.
To allow them to be modified. You can't otherwise modify the elements of an array without going into the ST monad.
Thanks! I forgot about the whole immutable thing :-) Haven't used arrays yet while learning Haskell!