compiler-discord/docker/haskell/run.sh
2019-06-01 01:04:15 -04:00

10 lines
189 B
Bash

if [ "$EVAL_EXPR" = "true" ]; then
ghc -e "$1"
else
mkdir "$CODEDIR" && cd "$CODEDIR"
printf %s "$1" > program.hs
ghc -e main program.hs
cd .. && rm -rf "$CODEDIR"
fi