[Haskell-cafe] Re: Why is getArgs in the IO monad?

Ashley Yakeley ashley at semantic.org
Tue Jan 18 18:14:58 EST 2005

In article <41ECD49F.9020601 at imperial.ac.uk>,
 Keean Schupke <k.schupke at imperial.ac.uk> wrote:

> Surely both requirements can be satisfied if the programs arguments are made
> parameters of main:
> main :: [String] -> IO ()
>     Keean.

Better yet, it should be an implicit parameter so as not to break 
existing programs.

  main :: (?args :: [String]) => IO ()

You could do the same with standard input and output.

Ashley Yakeley, Seattle WA

More information about the Haskell-Cafe mailing list