[Haskell] main::[String]->IO() ?

Steffen Mazanek s_mazanek at gmx.de
Mon Mar 22 23:09:26 EST 2004


Hello everybody,

each time I write an application that makes use of command line arguments
I have to copy&paste the code for dealing with these args to my program 
from a reference implementation, because it is so hard to remember.
What do you think about changing the default type of main or providing
an alternative, e.g., main_args, just like in C or Java?

I think this would simplify everyday-programming a lot. Or are there
any severe theoretical (semantical) problems (main is running in the IO 
monad either way)? 

Ciao,
Steffen


More information about the Haskell mailing list