cmdtheline: Declarative command-line option parsing and documentation library.

[ console, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

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 Term before use, as some operations make since to perform on Arg but not on Term.

  • ArgVal has only one method: parser and pp have been fused into a tuple, so that instantiation of ArgVal can be simplified for all parties.

  • Err is an instance of MonadIO: The Err monad now supports IO action.

  • File and Directory path validation: Taking advantage of new Err capabilities, the library provides new functions for validating Strings inside of Terms as being valid/existent file/directory paths.

Changes since 0.2.0:

  • Test friendly unwrap functions: To allow the testing of terms, there are now two new functions exported with System.Console.CmdTheLine.Term, unwrap and unwrapChoice. As well a datatype representing cause of early exit, EvalExit is exported.

Changes since 0.2.1

  • Added adapter for interfacing with Getopt in module System.Console.CmdTheLine.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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 && <0.6), directory (>=1.1), filepath (>=1.3 && <1.4), parsec (>=3.1 && <3.2), pretty (>=1.1 && <1.2), process (>=1.1), transformers (>=0.2 && <0.4) [details]
License MIT
Author Eli Frey
Maintainer Eli Frey <eli.lee.frey gmail com>
Category Console
Home page http://github.com/eli-frey/cmdtheline
Source repo head: git clone git://github.com/eli-frey/cmdtheline.git
Uploaded by EliFrey at 2013-04-29T01:24:45Z
Distributions
Reverse Dependencies 7 direct, 11 indirect [details]
Downloads 13393 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for cmdtheline-0.2.3

[back to package description]

CmdTheLine v0.2.1

Build Status

Command line option parsing with applicative functors.

Installation

To install, do

cabal install

Depends

All dependencies are provided by the Haskell Platform.

Docs

If you have enabled documentation in your cabal config file, after installation you should have a copy of the documentation locally. Otherwise see the Hackage repo.

Bugs

Please report bugs to the issue tracker.

Branches

###master The currently (0.2) stable branch.

###dev Bug fixes and aditions that don't break compatibility with master.

###0.3 The next release candidate.

Contributors

Bas Van Dijk -- GetOpt adapter

LICENSE

MIT - See file 'LICENSE' for details.

Copyright � 2012 Vincent Elisha Lee Frey