./wip/hs-ReadArgs, Simple command line argument parsing

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 1.2.1, Package name: hs-ReadArgs-1.2.1, Maintainer: szptvlfn

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.


Required to run:
[wip/ghc] [wip/hs-system-filepath] [devel/hs-text]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 59a7423ea698670c8ca196be65f7824a0ff4952b
RMD160: 4a8ff77560e522f4e6731a24a24d5aba442961bc
Filesize: 4.982 KB

Version history: (Expand)


CVS history: (Expand)


   2014-08-29 16:09:59 by Ryosuke Moro | Files touched by this commit (104)
Log message:
make it clear what package depend on

discussed with wiz@.
   2014-05-18 23:33:25 by Ryosuke Moro | Files touched by this commit (119)
Log message:
Remove hs-data-default-class, hs-dlist, hs-text, hs-utf8-string,
imported to pkgsrc/devel.
   2014-05-05 02:03:01 by Ryosuke Moro | Files touched by this commit (74) | Package updated
Log message:
Update MAINTAINER address
   2013-08-17 11:03:37 by Ryosuke Moro | Files touched by this commit (5)
Log message:
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.