[Minor corrections to new docs. malcolm**20010521142723] { hunk ./docs/faq.html 13 +
hunk ./docs/faq.html 23 -
+Conventional tracers (debuggers) for imperative languages allow the +user to step through the program computation, stop at given points +and examine variable contents. In our opinion this tracing method is +unsuitable for a lazy functional language such as Haskell, because its +evaluation order is complex, function arguments are usually unwieldy +large unevaluated expressions, and generally computation details do +not match the user's high-level view of functions mapping values +to values. Also the stack used by the Haskell runtime system does +not resemble the stack of function calls used by runtime systems of +strict languages. hunk ./docs/faq.html 38 -However, the trace file written by the traced program contains all information in the order of lazy evaluation. It is possible to write a viewing tool that admits single stepping through a lazy computation. +
+However, the trace file written by the traced program contains all +information in the order of lazy evaluation. It is possible to write +a viewing tool that admits single stepping through a lazy computation. hunk ./docs/faq.html 45 -Currently a traced program runs about 50 times slower than its untraced counterpart. We are working on reducing this factor. -As a rule of thumb, a reduction step produces about 40 bytes in the trace file. So trace files can easily grow to tenth and hundreds of megabytes. However, you can name some modules of your program as trusted, so that their reductions are not recorded in the trace. +
+Currently a traced program runs about 50 times slower than its +untraced counterpart. We are working on reducing this factor. +As a rule of thumb, a reduction step produces about 40 bytes in the +trace file. So trace files can easily grow to tens and hundreds +of megabytes. However, you can name some modules of your program +as trusted, so that their reductions are not recorded in +the trace. hunk ./docs/faq.html 56 -Hat nearly but not yet fully covers -the Haskell 98 language and its libraries. -Also it supports only few language extensions. -Check the Hat Feature -Summary to see exactly which parts of the language are missing, -and when you can expect them to be added. +
+Hat nearly (but not yet fully) covers the complete Haskell 98 language +and its libraries. It also supports only a few language extensions. +Check the Hat Feature Summary to +see exactly which parts of the language are missing, and when you +can expect them to be added. hunk ./docs/faq.html 67 +
hunk ./docs/index.html 13 -Hat is a source-level tracer for Haskell. It is a tool that gives the user access to otherwise invisible information about a computation. +Hat is a source-level tracer for Haskell. It is a tool that gives +the user access to otherwise invisible information about a computation. hunk ./docs/index.html 18 -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 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. hunk ./docs/index.html 24 -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. +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. + hunk ./docs/index.html 30 -Hat can be used for programs that terminate normally, that terminate with an error message or that terminate when interrupted by the programmer. +Hat can be used for programs that terminate normally, that terminate +with an error message or that terminate when interrupted by the +programmer. + hunk ./docs/index.html 35 - 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. + 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. hunk ./docs/index.html 42 -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. +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. + hunk ./docs/index.html 48 -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 [_,_]. +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 [_,_]. hunk ./docs/index.html 58 -For aborted computations, that is computations that terminated with an error message or were interrupted, hat-stack shows in which function call the computation was aborted. It does so by showing a virtual stack of function calls (redexes). So every function call on the stack caused the function call above it. The evaluation of the top stack element caused the error or during its evaluation the computation was interrupted. The shown stack is virtual, because it does not correspond to the actual runtime stack. The actual runtime stack enables lazy evaluation whereas the virtual stack corresponds to a stack that would be used for eager (strict) evaluation. +For aborted computations, that is computations that terminated +with an error message or were interrupted, hat-stack shows in which +function call the computation was aborted. It does so by showing a +virtual stack of function calls (redexes). So every function +call on the stack caused the function call above it. The evaluation +of the top stack element caused the error or during its evaluation +the computation was interrupted. The shown stack is virtual, +because it does not correspond to the actual runtime stack. The actual +runtime stack enables lazy evaluation whereas the virtual +stack corresponds to a stack that would be used for eager (strict) +evaluation. + hunk ./docs/index.html 95 -Hat-observe shows a top-level function. That is, for a given top-level function name it shows all the arguments with which is was called during the computation together with the respective results. +Hat-observe shows a top-level function. That is, for a given top-level +function name it shows all the arguments with which is was called +during the computation together with the respective results. + hunk ./docs/index.html 114 -Hat-detect is an interactive tool that enables locating semi-automatically an error in a program by answering a sequence of yes/no questions. Each question asked by hat-detect concerns the reduction of a redex - that is, a function application - to a value. You have to answer yes, if the reduction is correct with respect to your intentions, and no otherwise. After a number of questions hat-detect states which reduction is the cause of the observed faulty behaviour - that is, which function definition is incorrect. +Hat-detect is an interactive tool that enables locating +semi-automatically an error in a program by answering a sequence +of yes/no questions. Each question asked by hat-detect concerns +the reduction of a redex - that is, a function application - to a +value. You have to answer yes, if the reduction is correct +with respect to your intentions, and no otherwise. After a +number of questions hat-detect states which reduction is the cause +of the observed faulty behaviour - that is, which function definition +is incorrect. + hunk ./docs/index.html 143 -Hat-trail is an interactive tool that enables exploring a computation backwards, starting at the program output or an error message (with which the computation aborted). This is particularly useful for locating an error. You start at the observed faulty behaviour and work backwards towards the source of the error. +Hat-trail is an interactive tool that enables exploring a computation +backwards, starting at the program output or an error message +(with which the computation aborted). This is particularly useful +for locating an error. You start at the observed faulty behaviour +and work backwards towards the source of the error. + hunk ./docs/index.html 150 -Every reduction replaces an instance of the left-hand side of a program equation by an instance of its right-hand side. The instance of the left-hand side ``creates'' the instance of the right-hand side and is therefore called its parent. With hat-trail you can obtain the parent of an expression. +Every reduction replaces an instance of the left-hand side of a program +equation by an instance of its right-hand side. The instance of the +left-hand side ``creates'' the instance of the right-hand side and is +therefore called its parent. With hat-trail you can obtain +the parent of an expression. + hunk ./docs/index.html 161 -last' [] is the starting point, because its evaluation caused an error message. The parent of last' [] is last' (5+6:[]). -The parent of last' (5+6:[]) is last' (5 `div` 0:5+6:[]), etc. The parent of the subexpression 8 is 4*2 whose parent is xs. +last' [] is the starting point, because its evaluation +caused an error message. The parent of last' [] is +last' (5+6:[]). The parent of last' (5+6:[]) +is last' (5 `div` 0:5+6:[]), etc. The parent of the +subexpression 8 is 4*2 whose parent is +xs. + hunk ./docs/index.html 175 -
+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. hunk ./docs/index.html 239 +
+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. hunk ./docs/index.html 255 +To join mailing lists, go to the +haskell.org mailing list +manager. }