From aea38776d1d5032f04fdbe6f6dbe7a8ad96b6905 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 4 Oct 2020 15:14:24 -0700 Subject: [PATCH] [#24] New language: Idris --- backend/src/langs.ts | 16 ++++++++++++++++ scripts/docker-install-phase3b.bash | 4 ++++ scripts/docker-install-phase6.bash | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/backend/src/langs.ts b/backend/src/langs.ts index 428bd13..4c85a18 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -1530,6 +1530,22 @@ l ; ; o ; * 4 template: `procedure main () write("Hello, world!") end +`, + }, + idris: { + aliases: ["idr", "idris2"], + name: "Idris", + repl: "rm -f .idris/repl/init; idris2", + main: "Main.idr", + run: "mkdir -p .idris/repl; echo ':exec main' > .idris/repl/init; idris2 Main.idr -x main; idris2 Main.idr", + scope: { + code: `x : Int +x = 123 * 234`, + }, + template: `module Main + +main : IO () +main = putStrLn "Hello, world!" `, }, ink: { diff --git a/scripts/docker-install-phase3b.bash b/scripts/docker-install-phase3b.bash index 6913e4a..1157763 100755 --- a/scripts/docker-install-phase3b.bash +++ b/scripts/docker-install-phase3b.bash @@ -79,6 +79,10 @@ haxe # Icon icont +# Idris +chezscheme +gcc + # INTERCAL intercal diff --git a/scripts/docker-install-phase6.bash b/scripts/docker-install-phase6.bash index 5344257..f017b03 100755 --- a/scripts/docker-install-phase6.bash +++ b/scripts/docker-install-phase6.bash @@ -63,6 +63,14 @@ rm -rf erlang_ls # Hexagony git clone https://github.com/m-ender/hexagony.git /opt/hexagony +# Idris +wget -nv https://www.idris-lang.org/idris2-src/idris2-latest.tgz +tar -xf idris2-latest.tgz +make bootstrap-build SCHEME=chezscheme PREFIX=/usr/local +make install PREFIX=/usr/local +chmod -R a=u,go-w /usr/local/idris2-* +rm -rf Idris2-* idris2-latest.tgz + # Kalyn git clone https://github.com/raxod502/kalyn.git pushd kalyn >/dev/null