Help, I'm running Windows 95. [Version 4.00.1111].
Hugs works fine and GHC (on Win32) seems to have installed ok although I did have to
edit cygnus.bat to put
/GHC/GHC-4.05/BIN
in the path (is there a better way of doing this?). At least the Hello, world! program
worked.
Then I tried to use HaskellDirect.
First of all I tried to make in examples\math planning to use Hugs.
BASH.EXE-2.02$ make
../../ihc -fhs-to-c --hugs -c math.idl -o math.hs
gcc -mno-cygwin -mno-cygwin -c math.c -o math.dll_o
math.c:7: HDirect.h: No such file or directory
make: *** [math.dll_o] Error 1
I fixed this by copying c:\HaskellDirect\0.16\lib-src\HDirect.h to examples\math but
presumably there is some better way of resolving this problem.
I then invoked Hugs on Main.hs
C:\HaskellDirect\0.16\examples\math>c:\hugs98\hugs.exe
__ __ __ __ ____ ___ _________________________________________
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-1999
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| || Report bugs to: [EMAIL PROTECTED]
|| || Version: November 1999 _________________________________________
Haskell 98 mode: Restart with command line option -98 to enable extensions
Reading file "C:\HUGS98\lib\Prelude.hs":
Hugs session for:
C:\HUGS98\lib\Prelude.hs
Type :? for help
Prelude>
Current settings: +fewui -stgl.qk -h250000 -p"%s> " -r$$ -c40
Search path : -P{Hugs}\lib;{Hugs}\lib\hugs;{Hugs}\lib\exts;{Hugs}\lib\win32
Editor setting : -E
Preprocessor : -F
Compatibility : Haskell 98 (+98)
Prelude>
Prelude> :l main
Reading file "main.hs":
Reading file "Math.hs":
Reading file "C:\HUGS98\lib\exts\Addr.hs":
Reading file "HDirect":
ERROR "HDirect": Unable to open file "HDirect"
Addr>
I found two copies of HDirect, one in c:\hugs98\lib\com and one in
c:\haskelldirect\0.16\hugs-lib. I then tried with the following settings.
Current settings: +fewui -stgl.qk -h250000 -p"%s> " -r$$ -c40
Search path : -P{Hugs}\lib;{Hugs}\lib\hugs;{Hugs}\lib\exts;{Hugs}\lib\win32;
{Hugs}\lib\com
Editor setting : -E
Preprocessor : -F
Compatibility : Haskell 98 (+98)
I got the following output (minus the bit that scrolled off the top of the screen).
Reading file "C:\HUGS98\lib\exts\Bits.hs":
Reading file "C:\HUGS98\lib\exts\Int.hs":
Reading file "C:\HUGS98\lib\exts\Word.hs":
Reading file "C:\HUGS98\lib\Monad.hs":
Reading file "C:\HUGS98\lib\com\Pointer.lhs":
Reading file "C:\HUGS98\lib\exts\IOExts.hs":
Reading file "C:\HUGS98\lib\hugs\Trace.hs":
Reading file "C:\HUGS98\lib\IO.hs":
Reading file "C:\HUGS98\lib\Ix.hs":
Reading file "C:\HUGS98\lib\IO.hs":
Reading file "C:\HUGS98\lib\Array.hs":
Reading file "C:\HUGS98\lib\List.hs":
Reading file "C:\HUGS98\lib\Maybe.hs":
Reading file "C:\HUGS98\lib\List.hs":
Reading file "C:\HUGS98\lib\Array.hs":
Reading file "C:\HUGS98\lib\exts\IOExts.hs":
Reading file "C:\HUGS98\lib\exts\Foreign.hs":
Reading file "C:\HUGS98\lib\com\PointerPrim.hs":
Reading file "C:\HUGS98\lib\exts\Weak.hs":
Reading file "C:\HUGS98\lib\com\Pointer.lhs":
Reading file "C:\HUGS98\lib\com\AddrBits.hs":
Reading file "C:\HUGS98\lib\com\HDirect.lhs":
ERROR "C:\HUGS98\lib\com\HDirect.lhs": Entity "addrToInt" imported from module "
Addr" already defined in module "AddrBits"
HDirect does indeed import Addr. AddrBits defines addrToInt as
addrToInt :: Addr
-> Int
addrToInt p = unsafePerformIO (prim_AddrBits_addrToInt p)
On the other hand, Addr defines addrToInt as
primitive addrToInt :: Addr -> Int
I tried again with the following settings.
Current settings: +fewui -stgl.qk -h250000 -p"%s> " -r$$ -c40
Search path : -P{Hugs}\lib;{Hugs}\lib\hugs;{Hugs}\lib\exts;{Hugs}\lib\win32;
c:\haskelldirect\0.16\hugs-lib
Editor setting : -E
Preprocessor : -F
Compatibility : Haskell 98 (+98)
Again I got (minus the bit that scrolled off the top of the screen).
Reading file "C:\HUGS98\lib\exts\Bits.hs":
Reading file "C:\HUGS98\lib\exts\Int.hs":
Reading file "C:\HUGS98\lib\exts\Word.hs":
Reading file "C:\HUGS98\lib\Monad.hs":
Reading file "c:\haskelldirect\0.16\hugs-lib\Pointer.lhs":
Reading file "C:\HUGS98\lib\exts\IOExts.hs":
Reading file "C:\HUGS98\lib\hugs\Trace.hs":
Reading file "C:\HUGS98\lib\IO.hs":
Reading file "C:\HUGS98\lib\Ix.hs":
Reading file "C:\HUGS98\lib\IO.hs":
Reading file "C:\HUGS98\lib\Array.hs":
Reading file "C:\HUGS98\lib\List.hs":
Reading file "C:\HUGS98\lib\Maybe.hs":
Reading file "C:\HUGS98\lib\List.hs":
Reading file "C:\HUGS98\lib\Array.hs":
Reading file "C:\HUGS98\lib\exts\IOExts.hs":
Reading file "C:\HUGS98\lib\exts\Foreign.hs":
Reading file "c:\haskelldirect\0.16\hugs-lib\PointerPrim.hs":
Reading file "C:\HUGS98\lib\exts\Weak.hs":
Reading file "c:\haskelldirect\0.16\hugs-lib\Pointer.lhs":
Reading file "c:\haskelldirect\0.16\hugs-lib\AddrBits.hs":
Reading file "c:\haskelldirect\0.16\hugs-lib\HDirect.lhs":
ERROR "c:\haskelldirect\0.16\hugs-lib\HDirect.lhs": Entity "addrToInt" imported
from module "Addr" already defined in module "AddrBits"