All pastes #2073866 Raw Edit

Untitled

public text v1 · immutable
#2073866 ·published 2011-06-02 21:26 UTC
rendered paste body
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