Re: arguments to the main function throught runhugs
"Sigbjorn Finne" <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hugs.bugs |
|---|---|
| Message-ID | <145c01c2d881$1de430f0$6601a8c0@snapdragon> |
Hi there, have a look at the getArgs IO action from the standard System module (http://haskell.org/onlinereport/system.html): foo$ cat runner.hs module Main where import System main = do ls <- getArgs print ls foo$ runhugs runner.hs test ["test"] foo$ hth --sigbjorn ----- Original Message ----- From: "thiagohb" <[email protected]> To: <[email protected]> Sent: Wednesday, February 19, 2003 11:03 Subject: arguments to the main function throught runhugs > Hello, > I'm a student in Ouro Preto's University (Brazil) and I have a problem: > How can I pass arguments to the main function throught runhugs? > I'll need to use a string in the main function. How can I catch the string > from command line? > > For example: > runhugs main.hsx test > > Thank you. > Thiago Braga.