> When I try the following small program using the interactive hugs
> everything works fine.
> 
> ------------------------------------------------
> module Main where
> main = putStr "Hello, World\n"
> ------------------------------------------------
> 
> But when I used the stand-alone runhugs it does not work.
> When I run the above program using runhugs there is first
> a 3 sec. delay (I suppose the prelude is loaded during the
> delay) then the following line appears on the screen:
> 
> runhugs: 
> 
> Shouldn't 'Hello, World' be written on the screen?

On machines that don't support snprintf (eg Solaris), runhugs
tends to produce useless error messages.

Try testing using something like this:

  > hugs HelloWorld
  [ banner deleted ]
  Prelude> Main.main

If your program really is called HelloWorld, you'll get an error
message about empty literate files and will want to run with:

  > hugs -l HelloWorld

Once you have that stuff figured out, you can switch to using runhugs:

  > runhugs -l HelloWorld

and you can even put something like this on the first line of
your program:

  #!/usr/local/bin/runhugs -l -h30k

and then:

  chmod 755 HelloWorld
  ./HelloWorld

(the heap size is optional - but will make things smaller/faster)

Alastair

Reply via email to