Subject: CVS commit: wip/hs-ReadArgs
From: Ryosuke Moro
Date: 2013-08-17 11:03:37
Message id: E1VAcQN-0005Vl-MT@sfs-ml-2.v29.ch3.sourceforge.com

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.

Files:
RevisionActionfile
1.1addwip/hs-ReadArgs/DESCR
1.1addwip/hs-ReadArgs/Makefile
1.1addwip/hs-ReadArgs/PLIST
1.1addwip/hs-ReadArgs/buildlink3.mk
1.1addwip/hs-ReadArgs/distinfo