(Maybe [a])) → [FilePath] → IO [a]
readFiles handler files = do
  checked ← mapM handler files
  case filter isNothing checked of
    [] → return $ concatMap fromJust checked
    _ → exitWith $ ExitFailure 1
  
strings :: ([Event],[Event]) → ([Dec
readFiles :: (FilePath → IO (Maybe [a])) → [FilePath] → IO [a]
readFiles handler files = do
  checked ← mapM handler files
  case filter isNothing checked of
    [] → return $ concatMap fromJust checked
    _ → exitWith $ ExitFailure 1
readFiles handler files = do
  checked ← mapM handler files
  case filter isNothing checked of
    [] → return $ concatMap fromJust checked
    _ → exitWith $ ExitFailure 1