uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

Allow for multiple email parsing backends #76

Open bufordrat opened 1 year ago

bufordrat commented 1 year ago

Post Issue #75, the email parsing backend will be configurable via a command line flag or configuration option. For this issue, define a combinator that can take in two email parsing backends and output a new email parsing backend that implements alternative logic---i.e. the logic of the (<|>) operator from Haskell.

The logic of A <|> B is, roughly:

Broadly speaking, this could most likely become a module functor that would take two modules of signature PARSETREE and output a new module with the same signature as the output of Conversion.Make, which implements the above logic for two email parsing backends A and B. Another option might be to implement an alternative module functor for PARSETREE modules, i.e. one whose return signature is also PARSETREE.