Changeset 22988 for src/Pugs/Prim

Show
Ignore:
Timestamp:
11/12/08 09:59:51 (8 weeks ago)
Author:
audreyt
Message:

* GHC 6.10 support, part 1 of 3: Adjust for Map.lookup's new signature.

Files:
1 modified

Legend:

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

    r15777 r22988  
    5454            spec'   <- io . newTVarIO $ Map.fromList (vals :: [(String, Val)]) 
    5555            spec    <- stm . readTVar $ spec' 
    56             rule    <- fromVal =<< Map.lookup "rule" spec 
    57             global  <- fromVal =<< Map.lookup "global" spec 
    58             stringify <- fromVal =<< Map.lookup "stringify" spec 
    59             adverbs <- Map.lookup "adverbs" spec 
     56            rule    <- case Map.lookup "rule" spec of 
     57                Just v -> fromVal v  
     58                _      -> fail "Cannot find the 'rule' spec" 
     59            global  <- case Map.lookup "global" spec of 
     60                Just v -> fromVal v  
     61                _      -> fail "Cannot find the 'global' spec" 
     62            stringify <- case Map.lookup "stringify" spec of 
     63                Just v -> fromVal v  
     64                _      -> fail "Cannot find the 'stringify' spec" 
     65            adverbs <- case Map.lookup "adverbs" spec of 
     66                Just v -> fromVal v  
     67                _      -> fail "Cannot find the 'adverbs' spec" 
    6068            return $ VRule MkRulePGE{rxRule=rule, rxGlobal=global, rxStringify=stringify, rxAdverbs=adverbs} 
    6169        Just x   -> error ("can't deserialize: " ++ unpackBuf x)