Added haskell support
This commit is contained in:
parent
a89d22bd25
commit
3246ed6781
|
@ -117,6 +117,9 @@ case "$lang" in
|
|||
"typescript" | "ts")
|
||||
bin=typescript
|
||||
;;
|
||||
"haskell" | "hs")
|
||||
bin=haskell
|
||||
;;
|
||||
*)
|
||||
echo "invalid language"
|
||||
exit
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
cd /tmp/$2
|
||||
timeout -s KILL 10 ghc -dynamic -o binary code.code
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
|
@ -45,3 +45,5 @@ echo 'testing python2'
|
|||
../execute python2 test2.py
|
||||
echo 'testing python3'
|
||||
../execute python3 test3.py
|
||||
echo 'testing haskell'
|
||||
../execute haskell test.hs
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
main = putStrLn "Hello, World"
|
|
@ -66,3 +66,6 @@ echo '---'
|
|||
echo 'typescript'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "tsc --version"
|
||||
echo '---'
|
||||
echo 'haskell'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "ghc --version"
|
||||
echo '---'
|
||||
|
|
|
@ -218,6 +218,11 @@ make
|
|||
echo 'export PATH=$PATH:/opt/lua/lua54/src' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# install haskell
|
||||
# final binary: /usr/bin/ghc
|
||||
# get version: /usr/bin/ghc --version
|
||||
apt install ghc
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
@ -323,6 +328,7 @@ If an invalid language is supplied, a typical response will look like the follow
|
|||
- elixir
|
||||
- emacs
|
||||
- go
|
||||
- haskell
|
||||
- java
|
||||
- julia
|
||||
- kotlin
|
||||
|
|
Loading…
Reference in New Issue