getting started with the glasgow haskell compiler

Simon Marlow simonmar@microsoft.com
Thu, 9 Aug 2001 11:09:16 +0100


> I'm just getting started using the glasgow haskell compiler=20
> and when I try to=20
> compile a simple program, named Hello.lhs,  like this:
>=20
> module Main (main) where
> main =3D putStrLn "Hello World"
> end
>=20
> with the command
>=20
> ghc Hello.lhs
>=20
> I get the message on standard output:
>=20
> No definitions in file <perhaps you forgot the '>'s?>

The extension '.lhs' means "Literate Haskell source" which is described
here:

	http://www.haskell.org/onlinereport/literate.html

Normal Haskell source files, like the code example you give above,
should be placed in a file with a '.hs' extension.

Cheers,
	Simon