<A target="_top" HREF="manual_contents.html"><img align=center src="contents.gif" ALT="Contents"></A> Up Previous Next

Hugs commands

Hugs provides a number of commands that can be used to evaluate expressions, to load files, and to inspect or modify the behaviour of the system while the interpreter is running. Almost all of the commands in Hugs begin with the : character, followed by a short command word. For convenience, all but the first letter of a command may be omitted. For example, :l, :s and :q can be used as abbreviations for the :load, :set and :quit commands, respectively.

Most Hugs commands take arguments, separated from the command itself, and from one another, by spaces. The Haskell syntax for string constants can be used to enter parts of arguments that contain spaces, newlines, or other special characters. For example, the command:

 :load My File
will be treated as a command to load two files, My and File. Any of the following commands can be used to load a single file, My File, whose name includes an embedded space:
 :load "My File"
 :load "My\SPFile"
 :load "My\  \ File"
 :load My" "File
You may wish to study the lexical syntax of Haskell strings to understand some of these examples. In practice, filenames do not usually include spaces or special characters and can be entered without surrounding quotes, as in:
 :load fact.hs
The full set of Hugs commands is described in the following sections.

Basic commands
Loading and editing modules and projects
Finding information about the system