
Hi, I've tried to get Hat compiling on Windows today, and have had some success. I found the following problems and fixes: 1) hat-trans cannot be compiled with ghc -cpp (it breaks on the string gaps), and cpphs can't be used as pgmP as it is. I have submitted a patch for cpphs to make this possible. With this change, hat-trans builds fine for Windows. 2) When running hat-trans, its remarkably painful on Windows, and I got frequent unexplained crashes, but there are a few patches required: Windows does not have ntohl, so I added a specific one for Windows. SIGQUIT does not exist on Windows, I just commented out this line. fopen(file,"w") should be fopen(file,"wb") to use Binary mode under Windows. With these patches, the remaining issues are build issues - I am intending to write a very hacky hat-make which sorts these out, possibly in a Windows specific way, to make it a single hat-make Main command to generate a hat binary. I did not build the hat translated libraries under Windows, I took the Linux versions. With these changes I am able to generate a simple hat file that can be processed by the Linux hat tools properly. Thanks Neil

Neil Mitchell wrote:
I've tried to get Hat compiling on Windows today, and have had some success. I found the following problems and fixes:
Sounds great. Neither Malcolm nor I know much about Windows. So it's great that you are getting Hat to work under Windows. Ciao, Olaf PS: Concerning Int vs Integer I agree with Malcolm that it would only partially solve the problem with the defaulting rule; I think changing all Integers to Int is a too complex hack for a too unclear gain. I hardly ever had problems with the defaulting rule (except for one-line test programs), but that probably depends a lot on the kind of programs one writes.

Hi,
Continuing on the "Hat on Windows" stuff I have now written hat-make,
which builds a program for Hat tracing on Windows. I'll send this over
once I have written a Windows makefile which builds the Hat stuff.
Attached is a patch to fix hat-c.c, and a new ntohl.h file to be added
in hat\include. Since ntohl.h is not available on Windows and is used
in a few of the Hat tools it makes sense to separate this off.
Thanks
Neil
On 6/26/06, Olaf Chitil
Neil Mitchell wrote:
I've tried to get Hat compiling on Windows today, and have had some success. I found the following problems and fixes:
Sounds great. Neither Malcolm nor I know much about Windows. So it's great that you are getting Hat to work under Windows.
Ciao, Olaf
PS: Concerning Int vs Integer I agree with Malcolm that it would only partially solve the problem with the defaulting rule; I think changing all Integers to Int is a too complex hack for a too unclear gain. I hardly ever had problems with the defaulting rule (except for one-line test programs), but that probably depends a lot on the kind of programs one writes. _______________________________________________ Hat mailing list Hat@haskell.org http://www.haskell.org/mailman/listinfo/hat
participants (2)
-
Neil Mitchell
-
Olaf Chitil