Hat Logo

Hat - the Haskell Tracer


about
What is Hat?
How do I view a trace?
Compliance with Haskell 98
Known bugs
Libraries supported by Hat
Frequently asked questions
Copyright and licence information

download/build/install
Version 2.00 released 1xth June 2002.
Download Hat
System requirements
Build and install instructions
Configuration options
Recent changes

user guides
A simple tutorial introduction:
   (HTML) (TeX) (PostScript) (PDF)
A more advanced tutorial:
   (not yet available)
The Hat user manual:
   (HTML) (TeX) (PostScript) (PDF)
Reference Guide (hat-trans)
Reference Guide (browsers)

development
Technical publications
Known bugs
Wish list
Anonymous CVS repository

community
Mailing list for everything Hat-related
More general Haskell mailing lists
Other Haskell systems and resources

If you have any problems, please send a message to the mailing list at hat@haskell.org.


What is Hat?

Hat is a source-level tracer for Haskell 98, the standard lazy functional programming language. Hat is a tool that gives the user access to otherwise invisible information about a computation.

Note, Hat is now portable: it works with both ghc and nhc98

What is it good for?

Hat helps locating errors in programs. Furthermore, it is useful for understanding how a (correct) program works, especially for teaching and program maintenance. Hat is not a time or space profiler. Hat can be used for programs that terminate normally, that terminate with an error message or that terminate when interrupted by the programmer.

How does it work?

Tracing a program with Hat consists of two phases: First the specially compiled program runs as normal, except that additionally a trace is written to file. Second, after the program has terminated, the trace is viewed with a browsing tool. The trace consists of high-level information about the computation. It describes each reduction, that is, the replacements of an instance of a left-hand side of an equation by an instance of its right-hand side, and the relation of the reduction to other reductions. Because the trace describes the whole computation, it is huge. Hat comes with several tools to selectively view the fragments of the trace that are of interest. Each tool shows fragments of the computation in a particular way, highlighting a specific aspect.

How can I view a trace?

Because the trace describes the whole computation, it is huge. Hat comes with several tools to selectively view the fragments of the trace that are of interest. Each tool shows fragments of the computation in a particular way, highlighting a specific aspect.

All tools show function arguments in evaluated form, more precisely: as far evaluated as the arguments are at the end of the computation. For example, although in a computation the unevaluated expression (map (+5) [1,2]) might be passed to the function length, the tools will show the function application as length [1+5,2+5] or length [_,_].


The latest updates to these pages are available on the WWW from http://www.cs.york.ac.uk/fp/hat/

This page last modified: 2002.06.11
York Functional Programming Group