[Haskell-cafe] Program Command Line Arguments

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Mar 10 20:47:24 EST 2007

On Mar 10, 2007, at 20:46 , Dave at haskell.org, Feustel at haskell.org wrote:

> My apologies if this is a question with a trivial answer.
> Command line args in C are accessed via argc and argv[]
> defined as arguments to main();.
> How are command line arguments to a ghc-compiled program
> accessed in Haskell? Or is that even possible?

Take a look at the System.Environment module.

brandon s. allbery    [linux,solaris,freebsd,perl]     allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list