Show
Ignore:
Timestamp:
08/28/06 16:05:16 (2 years ago)
Author:
audreyt
Message:

* Put IArray into the IO monad, not the STM monad;

a STM-friendly array will need an explicitly-defined
data structure, most likely.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Yaml.hs

    r12317 r12800  
    2626fromYaml MkNode{n_elem=EStr str}   = return $ VStr $ decodeUTF8 $ unpackBuf str 
    2727fromYaml MkNode{n_elem=ESeq nodes} = do 
    28     vals    <- mapM fromYaml nodes 
    29     s       <- liftSTM $ newTVar (0 :: Int) 
    30     av      <- liftIO $ (C.fromList ([0..] `zip` map lazyScalar vals) :: IO IArray') 
    31     return $ VRef (arrayRef (av,s)) 
     28    av  <- mapM fromYaml nodes 
     29    val <- newArray av 
     30    return (VRef $ MkRef val) 
    3231fromYaml MkNode{n_elem=EMap nodes, n_tag=tag} = do 
    3332    case tag of