# Hat 2.04 Bugs and Limitations

This is a list of all known bugs and limitations in Hat 2.04. There is also a wish-list of features that we would like to add to Hat. Please mail hat@haskell.org to report any other problems you find.

### hat-trans problems:

- hat-trans output fails to compile if the source program depends on defaults to resolve numeric types. (See FAQ for workaround.)
- hat-trans can fail if the arity of source definitions or applications is large. (See FAQ for workaround.)
- Data constructions used in a trusted context are hidden if they are evaluated there before the result is demanded in an untrusted context.
- hat-trans generates type-incorrect code for FFI declarations (foreign imports).

### Run-time problems:

- Programs that exhaust memory fail with an incomplete trace file.

### Problems with viewing a trace

#### General

- List comprehensions and arithmetic ranges are not traced at source level: they are recorded and displayed in de-sugared form.
- Fixed in Hat 2.04 do statements are not traced at source level.
- Super-saturated applications are not shown.
- Traces involving pattern bindings may be incomplete.
- Fixed in Hat 2.02 Named fields are not traced at source level.
- Fixed in Hat 2.02 The viewing tools display some lists misleadingly: when the tail of a sugared list is cut off or undefined it is shown as if it was a final element.

#### Hat-observe

- hat-observe inappropriately lists trusted CAFs under :info and allows observations of CAF values that should be hidden.
- hat-observe may incorrectly show applications as distinct when arguments include a cyclic structure. (Example program: Cycles)
- ^C in a hat-observe window (to cut short a search) can shut down a hat-trail window spawned from the same hat-observe session.
- Fixed in Hat 2.02 After :set recursive off hat-observe shows the non-recursive calls of f even if given the application pattern f in f. (Example program: ObsRec)
- Fixed in Hat 2.02 hat-observe :info counts may not match the number of observations if there are partial or super-saturated applications. (Example program: MixArity)

#### Hat-trail

- If the output is empty, it cannot be selected.
- The display can become corrupted if output or error message from the traced program is wider than the display window.
- Fixed in Hat 2.02 Scrolling sometimes blanks the upper part of the display when the trace is extended and is deeper than the window. (Example program: BigExp)
- Fixed in Hat 2.02 The display can become corrupted if a single trail expression or equation is large enough to scroll off the screen. (Example program: BigExp)

#### Hat-detect

- Fixed in Hat 2.04 hat-detect is not currently included with the Hat browsing tools.
- It may assume that an application of a trusted function is OK, even if it has suspect children. Thus, the algorithm to locate the bug may occasionally go wrong.
- Only useable for computations that produce faulty output, not for computations that abort with an error message or are interrupted.
- Does not work correctly for programs that read input.

This page last modified: 12th October 2004