diff --git a/backend/src/langs.ts b/backend/src/langs.ts index 8bbe4e8..d027af8 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -450,6 +450,11 @@ func main() { repl: "ghci", main: "Main.hs", run: "ghci", + lspSetup: "cp /opt/haskell/hie.yaml hie.yaml", + lsp: "HIE_HOOGLE_DATABASE=/opt/haskell/hoogle.hoo hie --lsp", + lspInit: { + languageServerHaskell: {}, + }, template: `module Main where main :: IO () @@ -519,6 +524,7 @@ PLEASE GIVE UP main: "main.jl", run: "julia -L main.jl", lsp: `JULIA_DEPOT_PATH=:/opt/julia julia -e 'using LanguageServer; run(LanguageServerInstance(stdin, stdout))'`, + lspConfig: null, template: `println("Hello, world!") `, }, diff --git a/frontend/src/app.ts b/frontend/src/app.ts index 6642f8e..857e4bd 100644 --- a/frontend/src/app.ts +++ b/frontend/src/app.ts @@ -191,7 +191,9 @@ async function main() { (window as any).config = configuration; return Array( (configuration(params, token) as {}[]).length - ).fill(config.lspConfig || null); + ).fill( + config.lspConfig !== undefined ? config.lspConfig : {} + ); }, }, }, diff --git a/scripts/docker-install-phase5.bash b/scripts/docker-install-phase5.bash index f31775a..f9f9499 100755 --- a/scripts/docker-install-phase5.bash +++ b/scripts/docker-install-phase5.bash @@ -100,9 +100,15 @@ tar -xf swift.tar.gz -C /opt/swift --strip-components=2 ln -s /opt/swift/bin/swiftc /usr/bin/swiftc rm swift.tar.gz +# Haskell +mkdir -p /opt/haskell +gdown "https://drive.google.com/uc?export=download&id=1GPoR_ja4ns16KCamRgwB-JVag4HK0igz" /usr/bin/hie +gdown "https://drive.google.com/uc?export=download&id=1qSxj8JjAeetAmNjUGayX0RBARgr5R4Ij" /opt/haskell/hoogle.hoo +chmod +x /usr/bin/hie + # Kalyn cd /tmp -git clone https://github.com/raxod502/kalyn +git clone https://github.com/raxod502/kalyn.git pushd kalyn >/dev/null stack build kalyn mv "$(stack exec which kalyn)" /usr/bin/kalyn @@ -217,6 +223,14 @@ tee /opt/elm/elm.json >/dev/null <<"EOF" } EOF +# Haskell +mkdir -p /opt/haskell +tee /opt/haskell/hie.yaml >/dev/null <<"EOF" +cradle: + direct: + arguments: [] +EOF + # Unlambda tee /usr/bin/unlambda-repl >/dev/null <<"EOF" #!/usr/bin/env python3