consumer_bundle_run.tri (875B)
1 -- Fresh-store execution of independently packed interpreter and consumer. 2 -- Bundle packing/import are Haskell bootstrap operations for this spike. 3 !import "source.module" !Local 4 !import "io" !Local 5 !import "prelude" !Local 6 7 root = "__ROOT__" 8 main = io (onResult_ (sourceModuleLoadSelected root "consumerInterpreter" "runConsumer") 9 (problem : putStrLn (append "interpreter-load-failed: " problem)) 10 (run : onResult_ (sourceModuleLoadSelected root "consumerFizzbuzz" "fizzbuzz") 11 (problem : putStrLn (append "consumer-load-failed: " problem)) 12 (program : 13 lazyResult 14 (problem _ : putStrLn (append "consumer-run-failed: " problem)) 15 (output _ : lazyBool 16 (_ : putStrLn "consumer-bundle-ok") 17 (_ : putStrLn "consumer-bundle-wrong-output") 18 (equal? output [1 2 "Fizz" 4 "Buzz"])) 19 (run program [1 2 3 4 5])))) 20 main