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

Expose functions to render addresses to text #29

Closed romanofski closed 5 years ago

romanofski commented 5 years ago

This is a needed for round tripping mails in purebred: when editing mails as new, we want to populate the editor fields with header values. Using a combination of header* lenses with rendering the given addresses populates the fields without re-implementing those functions on the purebred side.

frasertweedale commented 5 years ago

@romanofski never mind the faily test (GHC 8.8 failed; I'll add it to allowed-failures in a separate commit). But can we have test(s) for this new function?

romanofski commented 5 years ago

Will add. Overall you think the addition makes sense?

frasertweedale commented 5 years ago

Yeah it's fine with me.

romanofski commented 5 years ago

I re-used the simple test fixture. Hope that is acceptable. There is enough information to write some QuickCheck round tripping tests, but I thought I leave that for another day.