I have now made HaskellDirect. I had to add
import GlaExts
even though I am running
The Glorious Glasgow Haskell Compilation System, version 4.04, patchlevel 1
I tried making example/math with
FOR_HUGS=NO and FOR_WIN32=NO
as I am running on
Linux lhrtba8fd85 2.2.12-20 #1 Thu Nov 11 12:45:54 GMT 1999 i686 unknown
HaskellDirect generates Haskell code which imports toInt from Int so the make fails. I
then patched this code
to use GlaExts and the make succeeds.
However, when I try to use Hugs by
FOR_HUGS=YES and FOR_WIN32=NO
I invoked hugs in math (remembering to comment out GlaExts in Pointer.lhs as hugs
doesn't understand this).
Current settings: +fewui -stgl.qk -h250000 -p"%s> " -r$$ -c40
Search path : -P/usr/local/share/hugs/lib:/usr/local/share/hugs/lib/hugs:/us
r/local/share/hugs/lib/exts:/usr/local/share/hugs/demos:/home/dom/haskelldirect/
hdirect-0.16/lib
Editor setting : -Evi
Preprocessor : -F
Compatibility : Haskell 98 (+98)
then loaded Main.hs. Here's the bit of hugs' output that didn't scroll off the top of
the screen
(sorry I don't know how to save it all).
Reading file "/usr/local/share/hugs/lib/exts/Int.hs":
Reading file "/usr/local/share/hugs/lib/exts/Bits.hs":
Reading file "/usr/local/share/hugs/lib/exts/Int.hs":
Reading file "/usr/local/share/hugs/lib/exts/Word.hs":
Reading file "/usr/local/share/hugs/lib/Monad.hs":
Reading file "/home/dom/haskelldirect/hdirect-0.16/lib/Pointer.lhs":
Reading file "/usr/local/share/hugs/lib/exts/IOExts.hs":
Reading file "/usr/local/share/hugs/lib/hugs/Trace.hs":
Reading file "/usr/local/share/hugs/lib/IO.hs":
Reading file "/usr/local/share/hugs/lib/Ix.hs":
Reading file "/usr/local/share/hugs/lib/IO.hs":
Reading file "/usr/local/share/hugs/lib/Array.hs":
Reading file "/usr/local/share/hugs/lib/List.hs":
Reading file "/usr/local/share/hugs/lib/Maybe.hs":
Reading file "/usr/local/share/hugs/lib/List.hs":
Reading file "/usr/local/share/hugs/lib/Array.hs":
Reading file "/usr/local/share/hugs/lib/exts/IOExts.hs":
Reading file "/usr/local/share/hugs/lib/exts/Foreign.hs":
Reading file "/home/dom/haskelldirect/hdirect-0.16/lib/PointerPrim.hs":
Parsing
ERROR "/home/dom/haskelldirect/hdirect-0.16/lib/PointerPrim.hs" (line 34): Synta
x error in declaration (unexpected keyword "import")
Foreign>
Presumably hugs doesn't like the word foreign. I did notice on the Windows version of
HaskellDirect that there is a
directory called lib-hugs so I copied this library on to Linux
Current settings: +fewui -stgl.qk -h250000 -p"%s> " -r$$ -c40
Search path : -P/usr/local/share/hugs/lib:/usr/local/share/hugs/lib/hugs:/us
r/local/share/hugs/lib/exts:/usr/local/share/hugs/demos:/home/dom/haskelldirect/
hdirect-0.16/hugs-lib
Editor setting : -Evi
Preprocessor : -F
Compatibility : Haskell 98 (+98)
However, I then get
Reading file "/usr/local/share/hugs/lib/exts/Word.hs":
Reading file "/usr/local/share/hugs/lib/Monad.hs":
Reading file "/home/dom/haskelldirect/hdirect-0.16/hugs-lib/Pointer.lhs":
Reading file "/usr/local/share/hugs/lib/exts/IOExts.hs":
Reading file "/usr/local/share/hugs/lib/hugs/Trace.hs":
Reading file "/usr/local/share/hugs/lib/IO.hs":
Reading file "/usr/local/share/hugs/lib/Ix.hs":
Reading file "/usr/local/share/hugs/lib/IO.hs":
Reading file "/usr/local/share/hugs/lib/Array.hs":
Reading file "/usr/local/share/hugs/lib/List.hs":
Reading file "/usr/local/share/hugs/lib/Maybe.hs":
Reading file "/usr/local/share/hugs/lib/List.hs":
Reading file "/usr/local/share/hugs/lib/Array.hs":
Reading file "/usr/local/share/hugs/lib/exts/IOExts.hs":
Reading file "/usr/local/share/hugs/lib/exts/Foreign.hs":
Reading file "/home/dom/haskelldirect/hdirect-0.16/hugs-lib/PointerPrim.hs":
Parsing
ERROR "/home/dom/haskelldirect/hdirect-0.16/hugs-lib/PointerPrim.hs": Error whil
e importing DLL "/home/dom/haskelldirect/hdirect-0.16/hugs-lib/PointerPrim.so":
/home/dom/haskelldirect/hdirect-0.16/hugs-lib/PointerPrim.so: cannot open shared
object file: No such file or directory
Presumably, I need to make hugs-lib somehow but I couldn't figure out how to do this.
Dominic.