As GolezTrol said, all programs should know which character should be run when the function is called. Many scripting languages โโdo not require (or simply do not need) the main routine, as they may have instructions located at the top level. This does not apply to Haskell, C, and many others - these languages โโneed an initial location and by convention, which is the main function (according to the Haskell specification - see Cat's answer).
The Haskell notification main does not accept any parameters that correspond to the program arguments - they are received through System.Environment.getArgs .
Thomas M. DuBuisson
source share