Show
Ignore:
Timestamp:
03/12/07 01:43:31 (21 months ago)
Author:
audreyt
Message:

* Change all liftSTM into stm and all liftIO into io.

Files:
1 modified

Legend:

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

    r15297 r15616  
    3333                val <- newScalar =<< fromYaml valNode 
    3434                return (key, val) 
    35             hv      <- liftIO $ (H.fromList H.hashString vals :: IO IHash) 
     35            hv      <- io $ (H.fromList H.hashString vals :: IO IHash) 
    3636            return $ VRef (hashRef hv) 
    3737        Just s | (pre, post) <- Str.splitAt 16 s   -- 16 == length "tag:pugs:Object:" 
     
    4949                return (key, val) 
    5050            --let spec    = Map.fromList (vals :: [(String, Val)]) 
    51             --spec    <- liftSTM . newTVar . Map.map lazyScalar $ Map.fromList (vals :: [(String, Val)]) 
    52             spec'   <- liftSTM . newTVar $ Map.fromList (vals :: [(String, Val)]) 
    53             spec    <- liftSTM . readTVar $ spec' 
     51            --spec    <- stm . newTVar . Map.map lazyScalar $ Map.fromList (vals :: [(String, Val)]) 
     52            spec'   <- stm . newTVar $ Map.fromList (vals :: [(String, Val)]) 
     53            spec    <- stm . readTVar $ spec' 
    5454            rule    <- fromVal =<< Map.lookup "rule" spec 
    5555            global  <- fromVal =<< Map.lookup "global" spec 
     
    7474toYaml (VStr str)   = return $ strNode (encodeUTF8 str) 
    7575toYaml v@(VRef r)   = do 
    76     ptr <- liftIO $ stableAddressOf r 
     76    ptr <- io $ stableAddressOf r 
    7777    if IntSet.member ptr ?seen then return nilNode{ n_anchor = AReference ptr } else do 
    7878        let ?seen = IntSet.insert ptr ?seen 
     
    8282            ifValTypeIsa v "Array" (return nodes) $ case v' of 
    8383                VObject _   -> return nodes 
    84                 _           -> liftIO $ toYamlNode r 
     84                _           -> io $ toYamlNode r 
    8585        return node{ n_anchor = AAnchor ptr } 
    8686toYaml (VList nodes) = do