New language: Spago (good lord that took forever)
This commit is contained in:
parent
3fafd3422f
commit
afc2fff6d8
|
@ -917,6 +917,26 @@ main :-
|
||||||
template: `html
|
template: `html
|
||||||
body
|
body
|
||||||
p Hello, world!
|
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: {
|
python: {
|
||||||
|
|
|
@ -30,6 +30,7 @@ nano
|
||||||
iputils-ping
|
iputils-ping
|
||||||
sudo
|
sudo
|
||||||
tmux
|
tmux
|
||||||
|
tree
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,9 @@ php
|
||||||
# Prolog
|
# Prolog
|
||||||
swi-prolog
|
swi-prolog
|
||||||
|
|
||||||
|
# PureScript
|
||||||
|
libtinfo5
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
python3
|
python3
|
||||||
python3-pip
|
python3-pip
|
||||||
|
|
|
@ -67,6 +67,9 @@ npm install -g intelephense
|
||||||
# Pug
|
# Pug
|
||||||
npm install -g pug-cli
|
npm install -g pug-cli
|
||||||
|
|
||||||
|
# PureScript
|
||||||
|
npm install -g purescript spago
|
||||||
|
|
||||||
# ReasonML
|
# ReasonML
|
||||||
npm install -g bs-platform
|
npm install -g bs-platform
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,27 @@
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -x
|
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
|
# Befunge
|
||||||
tee /usr/bin/befunge-repl >/dev/null <<"EOF"
|
tee /usr/bin/befunge-repl >/dev/null <<"EOF"
|
||||||
|
@ -133,4 +154,5 @@ while True:
|
||||||
EOF
|
EOF
|
||||||
chmod +x /usr/bin/unlambda-repl
|
chmod +x /usr/bin/unlambda-repl
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
rm "$0"
|
rm "$0"
|
||||||
|
|
Loading…
Reference in New Issue