parseargs: Full-featured command-line argument parsing library.

[ bsd3, console, library, program ] [ Propose Tags ]

Parse command-line arguments


[Skip to Readme]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.1.2, 0.1.3, 0.1.3.1, 0.1.3.2, 0.1.3.4, 0.1.3.5, 0.1.5.2, 0.2, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.7, 0.2.0.8, 0.2.0.9
Dependencies base (>=4.6 && <5), containers (<1) [details]
License BSD-3-Clause
Copyright Copyright (c) 2007 Bart Massey
Author Bart Massey <bart@cs.pdx.edu>
Maintainer Bart Massey <bart@cs.pdx.edu>
Revised Revision 1 made by phadej at 2016-05-29T11:37:12Z
Category Console
Home page http://github.com/BartMassey/parseargs
Source repo head: git clone git://github.com/BartMassey/parseargs.git
this: git clone git://github.com/BartMassey/parseargs.git(tag v0.2.0.3)
Uploaded by BartonMassey at 2015-11-28T02:22:31Z
Distributions Debian:0.2.0.9, LTSHaskell:0.2.0.9, NixOS:0.2.0.9, Stackage:0.2.0.9
Reverse Dependencies 3 direct, 0 indirect [details]
Executables parseargs-example
Downloads 19421 total (46 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-12-04 [all 1 reports]

Readme for parseargs-0.2.0.3

[back to package description]

parseargs: Command-line argument parsing for Haskell programs

Copyright © 2007 Bart Massey

This library provides System.Console.Parseargs, a module to assist in argument parsing for Haskell stand-alone command line programs.

The package provides a Haskell command-line argument "parser". You supply a specification of the arguments to your command-line program; parseargs reads the arguments and checks that they meet your spec. It then fills in a data structure that captures the relevant data, from which parsed arguments can be extracted as needed. See the Haddock documentation for the gory details.

I have used this code with ghc 6 and 7 on Linux. It is a fairly standard Hackage-ready package, to the extent I know how to construct such.

The 0.1.2 release includes a typeclass for argument types for easier use.

The 0.1.3 release includes more uniform and usable error handling.

The various 0.1.3.x point releases include bug fixes and various extra-minor enhancements. See the Git log.

The 0.1.4 release includes the ability to mix optional and required positional arguments.

The 0.1.5 release includes the "soft dash" option, giving the ability to allow positional arguments to begin with a dash if possible.

The 0.1.5.1 release fixes some warnings and stuff.

The 0.1.5.2 release fixes some missing documentation.

The 0.2 release cleans up some namespace pollution by removing ArgRecord and the args accessor from the public namespace. This allows the use of the name args by the user to describe program arguments.

The 0.2.0.1 release cleans up a bunch of documentation nits and cleans up copyright notices and license information.

The 0.2.0.2 release fixes the botched release of 0.2.0.1. Sigh.

This library is not what I set out to build. It definitely could also use some work. However, I use it all the time for writing little programs. I thought others might find it useful, and I also have released other code that depends on it, so I put it out there.

Have fun with it, and let me know if there are problems.

This program is licensed under the "3-clause ('new') BSD License". Please see the file COPYING in this distribution for license terms.