The cmdtheline package
CmdTheLine aims to remove tedium from the definition of command-line programs, producing usage and help with little effort.
The inspiration was found in Daniel Bunzli's http://erratique.ch/software/cmdliner library.
CmdTheLine uses applicative functors to provide a declarative, compositional mechanism for defining command-line programs by lifting regular Haskell functions over argument parsers.
A tutorial can be found at http://elifrey.com/2012/07/23/CmdTheLine-Tutorial/.
Suggestions, comments, and bug reports are appreciated. Please see the bug and issue tracker at http://github.com/eli-frey/cmdtheline.
Changes since 0.1:
More type safety: Types in CmdTheLine.Arg have been made more explicit to disalow unwanted behavior. Positional argument information and optional argument information are distinguished from each other. As well
Args must be transformed into
Termbefore use, as some operations make since to perform on
Argbut not on
ArgVal has only one method:
pphave been fused into a tuple, so that instantiation of
ArgValcan be simplified for all parties.
Err is an instance of MonadIO: The
Errmonad now supports IO action.
File and Directory path validation: Taking advantage of new
Errcapabilities, the library provides new functions for validating
Strings inside of
Terms as being valid/existent file/directory paths.
Changes since 0.2.0:
unwrapfunctions: To allow the testing of terms, there are now two new functions exported with System.Console.CmdTheLine.Term,
unwrapChoice. As well a datatype representing cause of early exit,
[Skip to Readme]
|Versions||0.1.0.0, 0.1.0.1, 0.1.1, 0.2.0.0, 0.2.1, 0.2.1.1, 0.2.2, 0.2.3|
|Dependencies||base (>=4.5 && <5), containers (==0.4.*), directory (>=1.1), filepath (==1.3.*), parsec (==3.1.*), pretty (==1.1.*), process (>=1.1), transformers (==0.3.*) [details]|
|Maintainer||Eli Frey <eli.lee.frey gmail com>|
|Source repo||head: git clone git://github.com/eli-frey/cmdtheline.git|
|Uploaded||Thu Jul 26 00:23:41 UTC 2012 by EliFrey|
|Downloads||9591 total (63 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
|Status||Docs not available [build log]
Last success reported on 2015-05-26 [all 8 reports]
Hackage Matrix CI
For package maintainers and hackage trustees