ofxToCopper
  :: (OfxIn -> Maybe OfxOut)
  -- ^
  -> Seq FilePath
  -- ^ Copper files to read
  -> Seq FilePath
  -- ^ OFX files to read
  -> IO Text
ofxToCopper fOfx copFilenames ofxFilenames = do
  copperTxts <- traverse readFile copFilenames
  let readCopperFiles = zipWith (\fp txt -> (Right fp, txt))
        copFilenames copperTxts
  readOfxFiles <- traverse readFile ofxFilenames
  result <- either Exception.throwIO return
    . ofxImportWithCopperParse fOfx readCopperFiles
    $ readOfxFiles
  return . printResult $ result

-- | Prints the 'WholeFile' to standard output.
ofxToCopper
  :: (OfxIn -> Maybe OfxOut)
  -- ^
  -> Seq FilePath
  -- ^ Copper files to read
  -> Seq FilePath
  -- ^ OFX files to read
  -> IO Text
ofxToCopper fOfx copFilenames ofxFilenames = do
  copperTxts <- traverse readFile copFilenames
  let readCopperFiles = zipWith (\fp txt -> (Right fp, txt))
        copFilenames copperTxts
  readOfxFiles <- traverse readFile ofxFilenames
  result <- either Exception.throwIO return
    . ofxImportWithCopperParse fOfx readCopperFiles
    $ readOfxFiles
  return . printResult $ result

-- | Prints the 'WholeFile' to standard output.
ofxToCopper fOfx copFilenames ofxFilenames = do
  copperTxts <- traverse readFile copFilenames
  let readCopperFiles = zipWith (\fp txt -> (Right fp, txt))
        copFilenames copperTxts
  readOfxFiles <- traverse readFile ofxFilenames
  result <- either Exception.throwIO return
    . ofxImportWithCopperParse fOfx readCopperFiles
    $ readOfxFiles
  return . printResult $ result

-- | Prints the 'WholeFile' to standard output.