-- import Data.Text

savePurchases :: FilePath -> [Purchase] -> IO ()
savePurchases fPath purchases = runResourceT $
  yield (toJSON purchases) $$ L.map (LLB.toStrict . encode) =$ B.sinkFile fPath
savePurchases :: FilePath -> [Purchase] -> IO ()
savePurchases fPath purchases = runResourceT $
  yield (toJSON purchases) $$ L.map (LLB.toStrict . encode) =$ B.sinkFile fPath
savePurchases fPath purchases = runResourceT $
  yield (toJSON purchases) $$ L.map (LLB.toStrict . encode) =$ B.sinkFile fPath