tag:blogger.com,1999:blog-5336273.post8592828905389817145..comments2023-08-23T21:56:42.999+09:00Comments on A++ [Eric Torreborre's Blog]: Processing CSV files in HaskellUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5336273.post-52995981539736511522019-09-14T04:13:46.624+09:002019-09-14T04:13:46.624+09:00Hi Eric,
Thanks for this helpful and interesting ...Hi Eric,<br /><br />Thanks for this helpful and interesting post.<br /><br />I have some suggestions and questions:<br /><br />1. It's a really bad idea to use <b>Double</b> for currency amounts. Much better to use <b>Centi</b> from <b>Data.Fixed</b> instead.<br /><br />2. You have a lot of instances of <b>$$</b> where I think <b>$</b> is meant. This is very confusing for less experienced Haskellers.<br /><br />3. In <b>parseCommerzBank</b> I think it would be better to produce a parse failure for bad dates rather than letting them go to <b>Nothing</b>.<br /><br />4. I'm wondering why you have the ADT in <b>InputLedgerLine</b> instead of having the parse alternatives all produce <b>LedgerLine</b>. Do you need to know after the fact which type of bank line produced the ledger line?<br /><br />I'm a YNAB user, too, so I found this post particularly interesting. However, all my accounts can be connected to YNAB with automatic feeds so I rarely have to download CSV directly. I've needed to process CSV for other financial applications, though, especially when importing legacy data from spreadsheets, and maybe that's your use case here.<br /><br />Thanks again,<br /><br />—NeilNeil Mayhewhttps://www.blogger.com/profile/09922675800100799542noreply@blogger.com