I've added the app version setter setAppVersion that was missing for some reason I couln't find.
I've also made a few changes that helps to write the application strings easily when using mkSubParser:
Adding a flipped version of setAppDescr, setAppEpilog and setAppVersion allows to use infix <$> to write something like:
-- This is my main cli parser
mainParser :: IO (CmdLnInterface MyType)
mainParser = mkSubParser
[ ("subaction1", mkDefaultApp subAction1Parser "subaction1")
, ("subaction2", mkDefaultApp subAction2Parser "subaction2") ]
-- and the main parser including descriptive strings can be written like this
parseCli :: IO (CmdLnInterface MyType)
parseCli = setVersion "1.2.3"
<$> setDescr "My application description"
<$> setEpilog "My application epilog"
<$> mainParser
Which I found clearer to understand than the current implementation.
I've added the app version setter
setAppVersion
that was missing for some reason I couln't find.I've also made a few changes that helps to write the application strings easily when using mkSubParser: Adding a flipped version of setAppDescr, setAppEpilog and setAppVersion allows to use infix
<$>
to write something like:Which I found clearer to understand than the current implementation.
I really hope you found this changes useful.
Regards. Agustín.