I typically do: ... main = getArgs >>= go go [whatever] = ...
On Mon, 22 Mar 2004, Steffen Mazanek wrote: > 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 > _______________________________________________ > Haskell mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/haskell > -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell