Christian,
In Haskell you can use exitWith :: ExitCode -> IO a from the System library,
so you don't need the program to "return" a "Int" (this is not a
esthetically pleasing in C!). The IO a allows the operation to be used
in any IO monad context, not just IO ().
Regards,
Kevin
At 6:40 pm 21/8/97, Christian Sievers wrote:
>Hello, I just wondered if it was ever considered to let the main function
>have the type IO Int, in order to let the haskell programm be able to
>return an exit code to the calling environment, as C's int main(...)
>does. I think real programms sometimes want to exit(1) in some
>cases.
>
>Christian Sievers
----------
Division of Computer Science, Tel: +44-1334 463241 (Direct)
School of Mathematical Fax: +44-1334 463278
and Computational Sciences, URL:
http://www.dcs.st-and.ac.uk/~kh/kh.html
University of St. Andrews, Fife, KY16 9SS.