bad news this morning, I was willing to try and use Leksah (nice looking application by the way) for continuing learning haskell.
I couldnt compile the "Hello World" example I found reading the leksah tutorial.
module Main (
main = putStrLn "Hello World"
) where
compilation-error: src\Main.hs:16:5: parse error on input
='`
and
module Main (
) where
main = putStrLn "Hello World"
compilation-error: src\Main.hs:1:0: The main function
main' is not exported by module Main'
What would you advise me to try something else ?
IMPORTANT EDIT: Now Leksah is shipped with a file Main.hs, loaded directly the first time you launch leksah, that contains a fully functionnal Hello World mini project. It has also minimalist unit test counter part. Great for beginners :-)
The text in the paranthesis after the module name is an export list. This means, that you have to put all functions in the program you want to export in there. But apart from this, you also have to define your main function somewhere. Try this:
module Main (
main
) where
main = putStrLn "Hello World"
PS: You can also remove the paranthesis and anything in there, than anything in your module is going to be exported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With