
21 Jul
2003
21 Jul
'03
9:38 a.m.
sonja groening
But you need to have a module called "Main", containing the function "main",
I think, that would be right, if I want to use main. But I just tried out a little programm like module Test where data Foo = Bar and got the error I mentioned above.
The example you give is not a complete Haskell program, because it doesn't contain a function called main. That is why nhc98 gives an error. However, perhaps you really want an interactive environment to try out your incomplete programs. In that case, you want to use 'hi' instead of nhc98 directly. 'hi' provides an interactive prompt for entering expressions and seeing their results, rather like the Hugs or ghci Haskell systems. Regards, Malcolm