The Hugs 98 User's Guide
Prev | Chapter 3. Changing the behaviour of Hugs | Next

# 3.3. Standalone programs

runhugs [`option`...] `file`

The runhugs command is an interpreter for an executable Hugs script, which must be a file containing a Haskell `Main` module. For example, an executable file might contain the lines

      #!/usr/local/bin/runhugs +l

      > module Main where
      > main = putStr "Hello, World\n"

When this file is executed, runhugs will invoke the `main` function. Any arguments given on the command line will be available through the `getArgs` action.

Prev | Home | Next
Environment variables used by Hugs | Up | Compiling modules that use the Foreign Function Interface