compiler-discord/docker/haskell/run.sh

11 lines
205 B
Bash
Raw Normal View History

2019-03-13 06:51:49 +01:00
if [ "$EVAL_EXPR" = "true" ]; then
ghc -e "$1" || true
2019-03-13 06:51:49 +01:00
else
mkdir "$CODEDIR" && cd "$CODEDIR"
printf %s "$1" > program.hs
ghc -e main program.hs || true
cd .. && rm -rf "$CODEDIR"
2019-03-13 06:51:49 +01:00
fi