pkgsrc-WIP-cvs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: wip/hs-ReadArgs



Module name:    wip
Committed by:   szptvlfn
Date:           Sat Aug 17 09:03:37 UTC 2013

Added Files:
        wip/hs-ReadArgs: DESCR Makefile PLIST buildlink3.mk distinfo

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.


To generate a diff of this commit:
cvs -z3 rdiff -u -r0 -r1.1 wip/hs-ReadArgs/DESCR wip/hs-ReadArgs/Makefile \
    wip/hs-ReadArgs/PLIST wip/hs-ReadArgs/buildlink3.mk \
    wip/hs-ReadArgs/distinfo

To view a diff of this commit:
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/hs-ReadArgs/DESCR?r1=0&r2=1.1
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/hs-ReadArgs/Makefile?r1=0&r2=1.1
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/hs-ReadArgs/PLIST?r1=0&r2=1.1
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/hs-ReadArgs/buildlink3.mk?r1=0&r2=1.1
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/hs-ReadArgs/distinfo?r1=0&r2=1.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
pkgsrc-wip-cvs mailing list
pkgsrc-wip-cvs%lists.sourceforge.net@localhost
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-cvs


Home | Main Index | Thread Index | Old Index