# The Haskell Tracer Project

This page describes the current state of our Haskell tracer. The theory about the tracing model, the implementation of the tracer, as well as a user guide is included. We also provide a demonstration of the tracer in action.

### Short introduction

We describe the design and implementation of an experimental system for tracing Haskell computations. The basis of our tracing method is a program transformation carried out by the compiler: transformed programs compute the same values as the original, but embedded in functional data structures that also include redex trails showing how the values were obtained. When a final result is obtained in a computation with redex trails, or when an error occurs, the programmer can use a special-purpose interactive display program to investigate the derivation in detail, with cross-links to the source program.

Similar schemes attempted by others have typically been limited, for example, with respect to the language used to express traced programs, the speed of traced execution, the detail recorded in the trace, and the size of computations for which traces can be built and explored. We aim to build a tracer for full Haskell, and ultimately a tracer that can be applied to large computations. Our present tracer, hosted by the nhc compiler, handles most of Haskell.

### Tracing Lazy Functional Computations (.dvi)

### Demonstration of the tracer (java required)

### Snapshots

This pictures below shows the tracer user interface when tracing the nhc compiler. The top part of the window displays the interactive redex trail, and the bottom part shows either the source code (the first picture) or the program output (the second picture).
The user can click on any expression, identifier or constant in the redex trail display to explore the redex trail of that item. By right-clicking on an item, the source code window will display the source code position of the particular occurrence of the item. By shift-right-clicking on an item, the source code window will display the source code of the definition of the item.
If the output window is selected, the user can click on any part of the program output, and the redex trail for the expression responsible for that piece of the output will be display in the redex trail window.