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:
try A
if it succeeds, move on
if it fails, try B
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.
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 ofConversion.Make
, which implements the above logic for two email parsing backendsA
andB
. Another option might be to implement an alternative module functor forPARSETREE
modules, i.e. one whose return signature is alsoPARSETREE
.