New language: Spago (good lord that took forever)
This commit is contained in:
parent
3fafd3422f
commit
afc2fff6d8
|
@ -917,6 +917,26 @@ main :-
|
|||
template: `html
|
||||
body
|
||||
p Hello, world!
|
||||
`,
|
||||
},
|
||||
purescript: {
|
||||
aliases: ["purs", "pure", "ps"],
|
||||
name: "PureScript",
|
||||
monacoLang: "plaintext",
|
||||
setup: `shopt -s dotglob; cp -R /opt/purescript/project-template/* "$PWD/"`,
|
||||
repl: "spago repl",
|
||||
main: "src/Main.purs",
|
||||
run: `if spago build -n; then spago run -n; (echo 'import Prelude'; echo 'import Main') > .purs-repl; spago repl; else echo 'import Prelude' > .purs-repl; spago repl -d; fi`,
|
||||
template: `module Main where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Effect (Effect)
|
||||
import Effect.Console (log)
|
||||
|
||||
main :: Effect Unit
|
||||
main = do
|
||||
log "Hello, world!"
|
||||
`,
|
||||
},
|
||||
python: {
|
||||
|
|
|
@ -30,6 +30,7 @@ nano
|
|||
iputils-ping
|
||||
sudo
|
||||
tmux
|
||||
tree
|
||||
vim
|
||||
wget
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ php
|
|||
# Prolog
|
||||
swi-prolog
|
||||
|
||||
# PureScript
|
||||
libtinfo5
|
||||
|
||||
# Python
|
||||
python3
|
||||
python3-pip
|
||||
|
|
|
@ -67,6 +67,9 @@ npm install -g intelephense
|
|||
# Pug
|
||||
npm install -g pug-cli
|
||||
|
||||
# PureScript
|
||||
npm install -g purescript spago
|
||||
|
||||
# ReasonML
|
||||
npm install -g bs-platform
|
||||
|
||||
|
|
|
@ -3,6 +3,27 @@
|
|||
set -e
|
||||
set -o pipefail
|
||||
set -x
|
||||
pushd /tmp >/dev/null
|
||||
|
||||
mkdir project-template
|
||||
pushd project-template >/dev/null
|
||||
spago init -C
|
||||
rm -rf .gitignore test
|
||||
sed -i 's#, "test/\*\*/\*\.purs"##' spago.dhall
|
||||
cat <<"EOF" > src/Main.spago
|
||||
import Prelude
|
||||
|
||||
import Effect (Effect)
|
||||
|
||||
main :: Effect Unit
|
||||
main = pure unit
|
||||
EOF
|
||||
spago build
|
||||
spago repl < /dev/null
|
||||
rm -rf src
|
||||
popd >/dev/null
|
||||
mkdir /opt/purescript
|
||||
mv project-template /opt/purescript/
|
||||
|
||||
# Befunge
|
||||
tee /usr/bin/befunge-repl >/dev/null <<"EOF"
|
||||
|
@ -133,4 +154,5 @@ while True:
|
|||
EOF
|
||||
chmod +x /usr/bin/unlambda-repl
|
||||
|
||||
popd >/dev/null
|
||||
rm "$0"
|
||||
|
|
Loading…
Reference in New Issue