Changeset 8652 for src/Pugs/Prim/Yaml.hs

Show
Ignore:
Timestamp:
01/14/06 00:34:11 (3 years ago)
Author:
gaal
Message:

* Pugs.Prim.Yaml - very minor golfage

Files:
1 modified

Legend:

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

    r8609 r8652  
    5050                val <- fromYaml valNode 
    5151                return (key, val) 
    52             let spec    = Map.fromList (vals :: [(String, Val)]) 
     52            --let spec    = Map.fromList (vals :: [(String, Val)]) 
     53            --spec    <- liftSTM . newTVar . Map.map lazyScalar $ Map.fromList (vals :: [(String, Val)]) 
     54            spec'   <- liftSTM . newTVar $ Map.fromList (vals :: [(String, Val)]) 
     55            spec    <- liftSTM . readTVar $ spec' 
    5356            rule    <- fromVal =<< Map.lookup "rule" spec 
    5457            global  <- fromVal =<< Map.lookup "global" spec 
     
    108111    h <- hash_fetch hv 
    109112    let assocs = Map.toList h 
    110     yamlmap <- flip mapM assocs $ \(ka, va) -> do 
     113    yamlmap <- forM assocs $ \(ka, va) -> do 
    111114        ka' <- toYaml $ VStr ka 
    112115        va' <- toYaml va