Implementation of our command line parsing combinators
Given the above data type we can easily implement the desired operations
on P a
parse :: P a -> [String] -> Either ErrorMessage a
- Traverse and translate to conventional parsing combinators
usage :: P a -> String
- Traverse and pretty print
- Because of the existential quantification in the data type,
polymorphic recursion is required to type these traversal
functions, so type signatures have to be given explicitly.
- See the source code.