
Hi, As from my previous mail to haskell-cafe I'm trying to get started working with a few haskell tools. I'm now trying to get hat to build, but hitting a problem while compiling. The error I get is: Hat/Hat.hs:265: Couldn't match `IOError' against `GHC.IOBase.Exception' Expected type: GHC.IOBase.Exception -> GHC.IOBase.IO (R a) Inferred type: IOError -> GHC.IOBase.IO a1 In the second argument of `catch', namely `exceptionHandler' In a 'do' expression: catch (toIO toId mkRoot (forceExp gmain)) exceptionHandler Hat/Hat.hs:274: Couldn't match `GHC.IOBase.Exception' against `IOError' Expected type: GHC.IOBase.Exception Inferred type: IOError In the first argument of `ioErrors', namely `exception' In the scrutinee of a case expression: ioErrors exception make[1]: *** [/Users/tatd100/Desktop/project/hat-2.02/targets/powerpc-Darwin6/obj/ hatlib/ghc/Hat/Hat.o] Error 1 make: *** [targets/powerpc-Darwin6/hat-lib-ghc] Error 2 during: ghc -I/Users/tatd100/Desktop/project/hat-2.02/include '-#include "hat-c.h"' -cpp -c -o /Users/tatd100/Desktop/project/hat-2.02/targets/powerpc-Darwin6/obj/ hatlib/ghc/Hat/Hat.o Hat/Hat.hs Any help again is much appreciated. Thanks Tom Davie

Thomas Davie
As from my previous mail to haskell-cafe I'm trying to get started working with a few haskell tools. I'm now trying to get hat to build, but hitting a problem while compiling.
The problems you are encountering with building Hat are largely due to the newer version of ghc (6.0) you are using. ghc-6.0 has some API changes in its Exception library. I have a workaround, but it turns out that fixing this one problem reveals several more issues with ghc-6.0, such as its stricter interpretation of some of the lexical rules of Haskell'98. I do hope to find workarounds for all of the ghc-6.0 compatibility issues, but in the meantime, you may make better progress if you use an earlier stable release of ghc such as 5.04.3 on MacOS X (assuming such a beast exists). Regards, Malcolm

On Tuesday, Jul 29, 2003, at 18:28 Europe/London, Malcolm Wallace wrote:
Thomas Davie
writes: As from my previous mail to haskell-cafe I'm trying to get started working with a few haskell tools. I'm now trying to get hat to build, but hitting a problem while compiling.
The problems you are encountering with building Hat are largely due to the newer version of ghc (6.0) you are using. ghc-6.0 has some API changes in its Exception library. I have a workaround, but it turns out that fixing this one problem reveals several more issues with ghc-6.0, such as its stricter interpretation of some of the lexical rules of Haskell'98.
I do hope to find workarounds for all of the ghc-6.0 compatibility issues, but in the meantime, you may make better progress if you use an earlier stable release of ghc such as 5.04.3 on MacOS X (assuming such a beast exists).
Regards, Malcolm
Unfortunately having gone back to v5.04.3 I'm back to the readline errors. I've been trying the build option to link against the fink copy again but it still doesn't compile... I can't see a similar place in the config file to add the relevant commands: BUILDWITH=ghc BUILDOPTS=" -L/sw/lib/ -lreadline -I/sw/include/ -DUSE_READLINE=1" INSTALLVER="2.01" INSTALLINFO="config: powerpc-Darwin6/ by tatd100@nimbus2.rcp.co.uk on 30 Jul 2003" BUILDBASEDIR=/Users/tatd100/Desktop/project/hat-2.02/targets LIBCOMPAT="" EXE= CC=cc GHCSYM=504 TRUE=/usr/bin/true Any ideas on how to get hat to compile? Is it possible that hmake isn't working correctly because I compiled it with v6.0 of ghc and then went back to an older version of the frameworks? Thanks a lot Tom Davie

Thomas Davie
Unfortunately having gone back to v5.04.3 I'm back to the readline errors. I've been trying the build option to link against the fink copy again but it still doesn't compile... I can't see a similar place in the config file to add the relevant commands:
Unfortunately, there is no attempt to detect readline in the Hat configuration scripts. It simply assumes that if you use ghc, readline is available without extra arguments. Maybe the best thing to do is just to disable readline for now. In Hat, it is only used for editing commands in the browser hat-observe, but can easily be omitted. In the file src/hattools/Makefile, change the line HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=1 to HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=0
Any ideas on how to get hat to compile? Is it possible that hmake isn't working correctly because I compiled it with v6.0 of ghc and then went back to an older version of the frameworks?
If there is any dynamic linking going on with respect to the ghc runtime system, then yes, rolling back the frameworks may cause a problem. However I don't really know whether to expect any dynamic linking on your platform. Regards, Malcolm

Any ideas on how to get hat to compile? Is it possible that hmake isn't working correctly because I compiled it with v6.0 of ghc and then went back to an older version of the frameworks?
If there is any dynamic linking going on with respect to the ghc runtime system, then yes, rolling back the frameworks may cause a problem. However I don't really know whether to expect any dynamic linking on your platform.
I suspect that there is, there's a note in the readme that code compiled with ghc will only run on machines with Haskell.framework installed, so I'm guessing there is. Ahh well... goes back and recompiles hmake. Thanks a lot Tom Davie

On Wednesday, Jul 30, 2003, at 17:19 Europe/London, Malcolm Wallace wrote:
Thomas Davie
writes: Unfortunately having gone back to v5.04.3 I'm back to the readline errors. I've been trying the build option to link against the fink copy again but it still doesn't compile... I can't see a similar place in the config file to add the relevant commands:
Unfortunately, there is no attempt to detect readline in the Hat configuration scripts. It simply assumes that if you use ghc, readline is available without extra arguments.
Maybe the best thing to do is just to disable readline for now. In Hat, it is only used for editing commands in the browser hat-observe, but can easily be omitted. In the file src/hattools/Makefile, change the line
HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=1 to HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=0
Hmm, that doesn't seem to have stopped make looking for readline: [nimbus2:~/Desktop/project/hat-2.02] tatd100% make cd src/hattools; make HC=ghc install hmake -hc=ghc -fglasgow-exts -package lang -package util -DUSE_READLINE=0 SrcRefViewer \ -d/Users/tatd100/Desktop/project/hat-2.02/targets/powerpc-Darwin6/obj/ hattools cd /Users/tatd100/Desktop/project/hat-2.02/targets/powerpc-Darwin6/obj/ hattools && ghc -fglasgow-exts -package lang -package util -o SrcRefViewer HighlightStyle.o Run.o SrcRefViewer.o ld: can't locate file for: -lreadline make[1]: *** [/Users/tatd100/Desktop/project/hat-2.02/lib/powerpc-Darwin6/hat-view] Error 1 make: *** [targets/powerpc-Darwin6/hat-tools-ghc] Error 2 Thanks Tom Davie

Thomas Davie
Maybe the best thing to do is just to disable readline for now. HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=1 to HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=0
Hmm, that doesn't seem to have stopped make looking for readline:
Probably you should remove the -package util as well, since that is where readline lives in the GHC world. Regards, Malcolm

On Thursday, Jul 31, 2003, at 17:48 Europe/London, Malcolm Wallace wrote:
Thomas Davie
writes: Maybe the best thing to do is just to disable readline for now. HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=1 to HMAKEFLAGS = -fglasgow-exts -package lang -package util -DUSE_READLINE=0
Hmm, that doesn't seem to have stopped make looking for readline:
Probably you should remove the -package util as well, since that is where readline lives in the GHC world.
Thanks a lot Malcolm, I've got everything I was going to look at working I think, thanks for putting up with some of my occasionally blatant stupidity. Tom Davie
participants (2)
-
Malcolm Wallace
-
Thomas Davie