purebred-mua / purebred-email

A fast email parsing library implemented in Haskell
https://hackage.haskell.org/package/purebred-email
GNU Affero General Public License v3.0
23 stars 4 forks source link

Improve handling of dates #16

Closed romanofski closed 4 years ago

romanofski commented 5 years ago

With the merge of #15 we've introduced an optic headerDate which uses parseTimeOrError. The use of this function could end up in an exception which is not handled. Instead, we would like to avoid using a non-total function and perhaps also parseTimeM which uses IO.

singpolyma commented 4 years ago

parseTimeM does not use IO but rather any useful failure Monad, including Maybe (which would be the normal thing to use here, I expect)