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.

_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to