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

Ketil Malde ketil+haskell at ii.uib.no
Wed Jan 19 03:38:44 EST 2005

Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:

> This suggests that making global parameters available only as
> arguments of main would be a bad idea. But they should be settable,
> to account for the rare case of wanting to substitute something else
> to a library which reads them itself.

Isn't it common for e.g. GUI frameworks to process argv[],
interpreting and removing the arguments they use.  So I'm not sure it
is such a 'rare case'.

(I guess you could do it differently in Haskell, e.g. have the library
init return the list of updated args)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list