Is there a way to extract a list of names and types from a command line program, made using optparse-applicative
?
I am +/- looking for some function of type ParserInfo a -> [(String,TypeRep)]
Is there a way to extract a list of names and types from a command line program, made using optparse-applicative
?
I am +/- looking for some function of type ParserInfo a -> [(String,TypeRep)]
No, there is no way. The relevant bits are:
Since the
x
s ofMultP
andBindP
are existentially quantified and do not carry aTypeable
constraint, the information about the types used at the leaves of aParser a
tree is lost at runtime.