[Haskell] getting started

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Sep 29 00:20:35 CEST 2011


On 29 September 2011 00:15, haskell <shubhammaheshwariy at gmail.com> wrote:
> yes i h ave seen this and learn your haskell for great god and wiki books can
> you tell me the firat script that works so i can tell what is the problem

You want a simple working program?

Put the following into a file called Hello.hs

<code>
main = putStrLn "Hello World!"
</code>

If you have GHC installed, then run "ghc --make Hello.hs" and then run
the resulting Hello executable ( run "./Hello" on *nix, double-click
the "Hello.exe" on Windows).

For hugs I'm not too sure, but you should be able to do "hugs
Hello.hs" and inside that just type in "main" (without quotes).

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell mailing list