Reputation: 57
I am using Winghci, and the problem is that when i use:
main = putStrLn "Hello, World!"
I am just trying to get some output from this text file without having to execute any functions.
The above program only works when I type main.
Thanks, help will be much appreciated.
Upvotes: 0
Views: 845
Reputation: 2311
To simply get some output without further typing you can run your file with runhaskell. It comes with the HaskellPlatform and resides inside the bin directory. You can also execute your haskell script with runhaskell via right click, but it won't show you a terminal once the script has finished. So you'll either want to do things from a terminal anyway or use ghci because it keeps one open.
Upvotes: 2