New new new try at implementing Global Script in Haskell. Compiles Global Script to 'byte-code' written in the IO monad (http://globalscript.org/)

root

This is *abandonware*.

It's been lightly kept up to date, but it almost certainly will not work out of the box.

In particular, gs-spec goes in $GLOBALSCRIPT now.

If this is revived, it needs to install everything into $GLOBALSCRIPT, too,
and it probably needs to be split into packages, too, like the old globalscript monorepo was.

You will need Plan 9 from User Space, here: https://9fans.github.io/plan9port/ .

You also will need the language spec, here: https://hub.darcs.net/jcast/globalscript-spec .
The language spec should go in a parallel directory to this checkout.

Set

    HSGLOBALSCRIPT=`pwd`
    GS_SPEC=whereever you put the globalscript-spec checkout

Then run

    sh install-prereqs.sh
    sh setup
    ./test-all

to test and build this checkout.

To run a Global Script program, wrap it in

import GSI.Env (runGSProgram)
$gsimports

main = runGSProgram $ [gs:value|
    -- Global Script code goes here
|]

, save that to a .hsgs file, then run

    $HSGLOBALSCRIPT/bin/hsgs2hs $foo.hsgs
    ghc -package-env=$HSGLOBALSCRIPT/package.env --make foo.hs -o foo
    ./foo

to compile and run it.