
Thanks, Olaf for your last reply. That seems to have helped. However, I still cannot debug my program because the interface files for Control.Monad.State are not there. Is there a good way to generate these files, or are they distributed seperately? The error I get is as follows: hat-trans TestData.hs Fail: does not exist Action: openFile Reason: No such file or directory File: /usr/local/include/hat/Control/Monad/State.hx peace, isaac

Isaac,
However, I still cannot debug my program because the interface files for Control.Monad.State are not there. Is there a good way to generate these files, or are they distributed seperately?
There should be a simple way to add any hierarchical library (that conforms to the Haskell 98 plus some extensions language supported by Hat). I note this item on our todo list; thank you for pointing it out. To solve your immediate problem there are two ways you could go: Malcolm recently added several Control.Monad.* libraries to Hat. So you can download the CVS version and build and install it. Alternatively (or if you need more libraries), you can add a library yourself. It unfortunately requires some work: Basically, libraries are transformed and compiled like any other module, except that Hat expects the interface file *.hx in a certain place and the object code to be part of the package "hat". I suppose the easiest way is to extend your source tree of Hat and modify a Makefile, so that rebuilding and reinstalling adds the libraries you miss. In the Hat source tree you find the directory "src/hatlib". The directory plus subdirectory contains a copy of the hierarchical libraries supported by Hat. You just add the libraries you want in the right directories. Then you need to extend the Makefile in "src/hatlib". You need to add the modules to either GHCONLYSRCS or TRANSSRCS (if suitable for any compiler). Then rebuilding and reinstalling should do the trick. I hope this helps, Olaf -- OLAF CHITIL, Dept. of Computer Science, The University of York, York YO10 5DD, UK. URL: http://www.cs.york.ac.uk/~olaf/ Tel: +44 1904 434756; Fax: +44 1904 432767

Once again, thanks for your helpful response. After installing the CVS version and adding some type sigs, I am able to hat-trans my code. However, the resulting instrumented executable outputs something different from the uninstrumented version. In particular, it outputs an empty list, where I expect it to output a very non-empty list. Is there a FAQ I should be looking at? peace, isaac

After installing the CVS version and adding some type sigs, I am able to hat-trans my code. However, the resulting instrumented executable outputs something different from the uninstrumented version. In particular, it outputs an empty list, where I expect it to output a very non-empty list.
I fear this sounds very much like a new bug in Hat. Can you send me your code? If you could produce a small example program that exposes the bug, that would be even better. Because I am currently busy it may take me some time to fix the bug. Ciao, Olaf -- OLAF CHITIL, Dept. of Computer Science, The University of York, York YO10 5DD, UK. URL: http://www.cs.york.ac.uk/~olaf/ Tel: +44 1904 434756; Fax: +44 1904 432767
participants (2)
-
Isaac Jones
-
Olaf Chitil