git @ Cat's Eye Technologies Robin / 43019cb
Fix Haste build. Chris Pressey 5 years ago
2 changed file(s) with 23 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
88 echo "ghc not found, not building $PROG.exe"
99 fi
1010
11 #if command -v hastec >/dev/null 2>&1; then
12 # echo "building $PROG.js with hastec"
13 # (cd src && hastec --make HasteMain.hs -o ../demo/$PROG.js) || exit 1
14 #else
15 # echo "hastec not found, not building $PROG.js"
16 #fi
11 # For this to work, you need hastec installed.
12 # You also need parsec installed in a way that haste can use it:
13 #
14 # haste-cabal install parsec-3.1.1
15 #
16 # Later versions might not work. For example, 3.1.13.0 fails to build for me at:
17 # Preprocessing library generic-deriving-1.12.3...
18 # src/Generics/Deriving/TH/Pre4_9.hs:177:20:
19 # parse error on input ‘->’
20 #
21 # You also need random installed in a way that haste can use it:
22 #
23 # haste-cabal install random-1.1
24 #
25
26 if command -v hastec >/dev/null 2>&1; then
27 echo "building $PROG.js with hastec"
28 (cd src && hastec --make HasteMain.hs -o ../demo/$PROG.js) || exit 1
29 else
30 echo "hastec not found, not building $PROG.js"
31 fi
1732
1833 ./build-packages.sh
44 import Haste.Events
55
66 import Language.Robin.Env (mergeEnvs)
7 import Language.Robin.Parser (parseRobin)
7 import Language.Robin.Parser (parseToplevel)
88 import Language.Robin.Intrinsics (robinIntrinsics)
99 import Language.Robin.Builtins (robinBuiltins)
1010 import qualified Language.Robin.TopLevel as TopLevel
1717 where
1818 execute = do
1919 Just program <- getValue progElem
20 case parseRobin program of
20 case parseToplevel program of
2121 Right topExprs -> do
2222 let env = (mergeEnvs robinIntrinsics robinBuiltins)
2323 let (env', reactors, results) = TopLevel.collect topExprs env [] []