Hat Logo

Hat - The Haskell Tracer

Table of Contents

What is Hat?
How can I view a trace?
Tutorials and Documentation
Current Release
Development
Mailing Lists
Publications

What is Hat?

Hat is a source-level tracer for Haskell. It is a tool that gives the user access to otherwise invisible information about a computation.

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.

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 tool.

Hat can be used for programs that terminate normally, that terminate with an error message or that terminate when interrupted by the programmer.

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.

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 [_,_].

Tutorials and Documentation

Current Release

Hat 1.12 is part of the Haskell system nhc98. So you get Hat by downloading nhc98. Please mail bug reports to nhc-bugs@haskell.org.

Development

The ART project

ART (Advanced Redex Trails) is an EPSRC project (started 1st March 2000) to develop a tracer/debugger for Haskell programs. Hat is developed within the ART project. The ART project team has the following active members: Colin Runciman, Malcolm Wallace, Olaf Chitil, Thorsten Brehm and Phil Hassall. ART builds on previous work by Colin and Jan Sparud.

Plans for Future Releases

The ART project proposal describes well our main aims. Note that details have changed and will continue to change. Aims for the near future are:

Support Hat!

You can help us to make Hat a valuable tool for all programmers. Give us feedback! Starting with bug reports you can tell us what you consider as Hat's major deficiencies and which improvements would benefit you most. Thus you may influence our priorities and contribute new ideas.

We are especially looking for medium sized programs (300-3000 lines) for testing and evaluating Hat. Please contact us if you want to contribute a program.

Mailing lists

Because Hat is currently part of nhc98, the nhc mailing lists are the forum for discussing Hat. To join mailing lists, go to the haskell.org mailing list manager.

Publications

The ART project is the successor of an earlier project and builds on its work which is described in the following publications:


This page last modified: 13 March 2002
York Functional Programming Group