#!/bin/bash
# Runs the example with the flags of SPRITE_INTERPRETER_FLAGS.
set -euo pipefail
cd "$(dirname "$0")"
: "${SPRITE_HOME:=$(cd ../.. && pwd)/install}"
export SPRITE_HOME
export SPRITE_INTERPRETER_FLAGS="${SPRITE_INTERPRETER_FLAGS:-backend:cxx}"
export LC_ALL=C.UTF-8 PYTHONIOENCODING=utf-8
unset CURRYPATH
echo '% python go.py'
"$SPRITE_HOME/bin/python" go.py
echo '% sprite-exec Streams.curry -g threeOut'
"$SPRITE_HOME/bin/sprite-exec" Streams.curry -g threeOut
