Experiment 0000  
~~~~~~~~~~~~~~~

Portability
~~~~~~~~~~~
Linux/gcc

Building binaries
~~~~~~~~~~~~~~~~~

cd unix
./configure --with-standalone
cd ..

Add these lines to the end of the Makefile
<<<<
test$(OBJ)	: config.h options.h server.h test.c
test$(EXE)	: test$(OBJ)
	  	  $(LD) $(LDFLAGS) test$(OBJ) $(LIBS) -o test$(EXE)
>>>>
cp Expt/e0000/test.c .
make test hugs.so

Tests
~~~~~

test loads e0000/Foo.hs and attempts to run various functions
defined in it.  It takes Hugs command line options (but no filenames)
as arguments.


Test 1
~~~~~~

./test -P../lib:../lib/hugs +q
<<<<
Result1: 1
Result3: 2
Result4: 3
Error

Reading script file "This File Disnae Exist":


ERROR "This File Disnae Exist": Unable to open file "This File Disnae Exist"

Result5: 6
Result6: hello
hello
hello again
String: "hello again"
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>>>


Test 2
~~~~~~

./test -P../lib:../lib/hugs
<<<<
Reading script file "../lib/Prelude.hs":
Reading script file "../lib/hugs/Dynamic.hs":
Reading script file "../lib/hugs/IOExtensions.hs":
Reading script file "../lib/hugs/IORef.hs":
Reading script file "../lib/IO.hs":
Reading script file "../lib/Ix.hs":
Reading script file "../lib/Maybe.hs":
Reading script file "../lib/IO.hs":
Reading script file "../lib/hugs/IOExtensions.hs":
Reading script file "../lib/hugs/Dynamic.hs":
                   
Hugs session for:
../lib/Prelude.hs
../lib/hugs/IORef.hs
../lib/Ix.hs
../lib/Maybe.hs
../lib/IO.hs
../lib/hugs/IOExtensions.hs
../lib/hugs/Dynamic.hs
Reading script file "e0000/Foo.hs":
                   
Hugs session for:
../lib/Prelude.hs
../lib/hugs/IORef.hs
../lib/Ix.hs
../lib/Maybe.hs
../lib/IO.hs
../lib/hugs/IOExtensions.hs
../lib/hugs/Dynamic.hs
e0000/Foo.hs
Result1: 1
Reading script file "e0000/Foo.hs":
                   
Hugs session for:
../lib/Prelude.hs
../lib/hugs/IORef.hs
../lib/Ix.hs
../lib/Maybe.hs
../lib/IO.hs
../lib/hugs/IOExtensions.hs
../lib/hugs/Dynamic.hs
e0000/Foo.hs
Result3: 2
Result4: 3
Reading script file "This File Disnae Exist":


ERROR "This File Disnae Exist": Unable to open file "This File Disnae Exist"
Error


Result5: 6
Result6: hello
hello
hello again
String: "hello again"
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>>>
