main :: IO () main = handleSqlError $ do config <- liftM P.parseConfig $ readFile "blah.ini" case config of Left err -> error $ show err Right xs -> map runCfg xs --runCfg :: (String, [(String, String)]) -> IO () runCfg c = let cfg = M.fromListWith (++) $ map (\ (k, v) -> (k, [v]) ) $ snd c sorIO = connectODBC $ svlu "_ODBC1" cfg carIO = connectODBC $ svlu "_ODBC2" cfg in do sconn <- sIO ... putStrLn $ "Mismatched between SOR and carrier: " ++ mismatch --------------------------------- GHC sez: Couldn't match expected type `IO a0' with actual type `[b0]' In the return type of a call of `map' In the expression: map runCfg xs In a case alternative: Right xs -> map runCfg xs using runCfg $ head xs in place of map runCfg xs works. So I think I just can't use map like I want to. For some reason.