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

Hugs for beginners

This section covers the basics that you need to understand to start using Hugs. Most of the points discussed here will be familiar to anyone with experience of previous versions of Hugs or Gofer. To begin with, we need to start the interpreter; the usual way to do this is by using the command hugs, which produces a startup banner something like the following (On Windows 95/NT, the installation procedure adds Hugs to the start menu. You can also start the interpreter by double clicking on a .hs or .lhs file.):
      ___    ___   ___    ___   __________   __________
     /  /   /  /  /  /   /  /  /  _______/  /  _______/        Hugs 1.4
    /  /___/  /  /  /   /  /  /  / _____   /  /______  The Nottingham and Yale
   /  ____   /  /  /   /  /  /  / /_   /  /______   /   Haskell User's System
  /  /   /  /  /  /___/  /  /  /___/  /  _______/  /        December, 1997
 /__/   /__/  /_________/  /_________/  /_________/          

   Copyright (c) The University of Nottingham and Yale University, 1994-1997.
    Bug reports: hugs-bugs@haskell.org.   Web: http://www.haskell.org/hugs.

 Reading script file "/Hugs/lib/Prelude.hs":

 Hugs session for:
 /Hugs/lib/Prelude.hs
The file /Hugs/lib/Prelude.hs mentioned here contains standard definitions that are loaded into Hugs each time that the interpreter is started; the filename will vary from one installation to the next (If Hugs does not load correctly, and complains that it cannot find the prelude, then Hugs has not been installed correctly and you should look at the installation instructions.). You may notice a pause while the interpreter is initialized and the prelude definitions are loaded into the system.

The three main concepts that you need to know about before you can make proper use of Hugs are expressions, commands, and scripts.

Expressions
Commands
Programs