dev-haskell / readargs

Simple command line argument parsing

Official package sites : https://github.com/rampion/ReadArgs ·

ReadArgs provides the @readArgs@ IO action, which lets you tell the compiler to parse the command line arguments to fit the type signature you give. For example @(a :: Int, b :: String, c :: Float) <- readArgs@ would parse the first runtime argument as an @Int@, the second as a @String@ (no quotes required) and the third as a @Float@. If the runtime arguments are incompatible with the type signature, then a simple usage statement is given of the types needed. Continuing the previous example, if it was used in a program named @Example@, the error message for the above action would be: @ usage: Example Int String Float @ Any type that has both @Typeable@ and @Read@ instances can be used. @Char@, @String@, and @Text@ are handled specially so that command line arguments for both do not require quotes (as their @Read@ instances do). A special instance is provided for @FilePath@ so that no constructor or quotes are required. @readArgs@ also supports optional arguments and variadic arguments. Optional arguments are specified using @Maybe@, and variadic arguments using a list. @(a :: Int, b :: Maybe String, c :: [Float]) <- readArgs@ would successfully parse any of the following sets of command line arguments: @ Example 1 Example 1 2 3 4 Example 1 foo Example 1 foo 2 3 4 @ But not @ Example Example foo Example 1.0 @ Usage statements for optional and variadic arguments use command-line parlance: @ usage: Example Int [String] [Float..] @ Note that both optional and variadic parsers are greedy by default (so @Example 1 2 3 4@ was parsed as @(1, "2", [3.0,4.0])@. They may both be made non-greedy through use of the @NonGreedy@ constructor: @ ( a :: Int , NonGreedy b :: NonGreedy Maybe String , NonGreedy c :: NonGreedy [] Float ) <- readArgs @

v1.2.3 :: 0/1.2.3 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
doc hscolour profile test

v1.2.2 :: 0/1.2.2 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
doc hscolour profile test

General

doc
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
hscolour
Include coloured haskell sources to generated documentation (dev-haskell/hscolour)
profile
Add support for software performance analysis (will likely vary from ebuild to ebuild)
test
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

dev-haskell / cabal : A framework for packaging Haskell software

dev-haskell / haddock : A documentation-generation tool for Haskell libraries

dev-haskell / hscolour : Colourise Haskell code

dev-haskell / hspec : A Testing Framework for Haskell

dev-haskell / system-filepath : High-level, byte-based file and directory path manipulations (deprecated)

dev-haskell / text : An efficient packed Unicode text type

dev-lang / ghc : The Glasgow Haskell Compiler

dev-haskell / system-filepath : High-level, byte-based file and directory path manipulations (deprecated)

dev-haskell / text : An efficient packed Unicode text type

dev-lang / ghc : The Glasgow Haskell Compiler

dev-haskell / basic-prelude : An enhanced core prelude; a common foundation for alternate preludes

Robin H. Johnson · gentoo
Drop $Id$ per council decision in bug #611234.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Sergei Trofimovich · gentoo
dev-haskell/readargs: bump up to 1.2.3
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Sergei Trofimovich · gentoo
dev-haskell/readargs: drop old
Package-Manager: portage-2.2.28
Justin Lecher · gentoo
Use https by default
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Robin H. Johnson · gentoo
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed