Download HOOD

Home ] [ Downloading ] Documentation ] Cheat Sheet ] About HOOD ]


Downloading and Installing HOOD

Though HOOD is quite portable, versions for each Haskell system are provided on this page. All version derive from the same master source file, and should be comparable in functionality. 

Currently HOOD is just a single Haskell module, Observe.lhs

You install it by including it like any other Haskell module. Specific details are included in the section about each Haskell system.

You might also want to pull down the examples module, Main.hs, which contains several examples from the documentation

It is expected that Observe.lhs will eventually become a member of the hslibs Haskell library repository. This will simplify downloading in the future.

HOOD for Hugs98 (Classic Hugs)

Hugs98 before Feb 2001

Observe.lhs for Hugs98.

This can be loaded into your program by either

  • Placing Observe.lhs in the same directory as your other Haskell source files.
  • Placing Observe.lhs in a directory on you Hugs (library) path.
Then import the module (using "import Observe") and start using HOOD...

You will need to use the -98 flag, because Observe.lhs uses some Hugs extensions.

Hugs98, Feb 2001 and later

Hugs98, Feb 2001 release (and later) include a built in polymorphic version of observe. There is no need to download things, just

  import Observe
and start debugging!

HOOD for GHC

Observe.lhs for GHC (4.08).


Observe.lhs for GHC (5.00.x).


Place Observe.lhs in the same directory as your other Haskell source files, and add the file to your build system (typically a makefile). You will need to use the flags: "-fglasgow-exts -package lang -package concurrent -cpp", because Observe.lhs for GHC uses some GHC libraries. (For 4.06, use -syslib instead of -package).

There is a bug in 4.08 that is tickled by the multiple observer stuff, so the nested observe is not supported under this version of HOOD for GHC. 

(BTW: GHC from the the CVS HEAD has Observe.lhs in hslibs).

Optional for GHC:

  • GHC can catch keyboard interrupts (Control-C), and turn them into exceptions, which can been seen by HOOD. If you want to see ^C inside your structures, add to your main function the following code.

main = do
    catchCtrlC
    .. rest of program ...

catchCtrlC = do
   main_thread <- myThreadId
   installHandler sigINT (Catch (hupHandler main_thread)) Nothing
     where
       hupHandler :: ThreadId -> IO ()
       hupHandler main_thread
          = raiseInThread main_thread (ErrorCall "Control-C")

You also need to import the Posix library. (Stolen from Simon Marlow's Haskell web server)

HOOD for nhc98

Provided with nhcC98

Downloading Documentation

The documentation is online, on this website. Offline copies are available in various formats will be available real soon now.

Downloading a source copy of HOOD

HOOD is held on the CVS repository, in the module hood. If you want to start adding things, email me (andy@cse.ogi.edu), and I'll help you get going.

We also have an online HTML version of the original (before preprocessing) source (warning - its large).