
[I move this thread to haskell-cafe.] On Mon, 20 Aug 2001, Johansson Mikael wrote:
I'm starting up using a GHC-compiler and have successfully compiled a simple "Hello World" program. Thanks for the responses. Now I'm trying to use some simple programs from haskell.org/hugs but there are problems.
AnsiDemo.hs:10: Variable not in scope: `writeStr'
It seems some object are missing. I have tried to find them in ghc/lib/imports and others but haven't succeded. Is there some libraries I need to run these hugs-files on my ghc-compiler?
AnsiDemo.hs imports some hugs-specific files (AnsiInteract.hs, ...) which are also available in the hugs distribution but (somewhat confusing for your use) not in the demos directory. [Maybe the hugs example suite could be transformed into a stand-alone Haskell example suite? Any takers?] If you have hugs installed, then the necessary files are in ../lib/hugs (seen from the demos directory). I think the files for AnsiDemo are propoer Haskell 98 and not using any hugs-extensions so it should work. (Using ghci-5.0 it "compiles" OK, but on my Solaris xterm the printing is delayed - that might work better under Window$.) For use with ghc the required files could either be copied/moved into the demos directory, or you could start ghc with -i../lib/hugs added to the command line (so that it searches theat directory as well). I attach a tarball with the directory tree including lib and demos from my installation of hugs. Good luck, Patrik Jansson
participants (1)
-
Patrik Jansson