Bryan O'Sullivan <[EMAIL PROTECTED]> writes: > 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! _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe