commercialhaskell / commercialhaskell/stack
HLS fails due to stack and liquidhaskell
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments
HLS does not work if using stack and liquid haskell, if i switch to cabal it works.
### Steps to reproduce
vscode 1.73.0 with Haskell plugin configured to use ghcup
MacOS Monterey 12.6
ghc 8.10.7
stack 2.9.1
HLS 1.8.0.0
My problem is similar to https://github.com/haskell/haskell-language-server/issues/3134
This is my stack.yaml
```
resolver: lts-18.28
packages:
- .
extra-deps:
- hashable-1.3.0.0
- rest-rewrite-0.3.0
- git: https://github.com/ucsd-progsys/liquidhaskell.git
commit: f917323a1f9db1677e592d6ffc81467d53588d70
subdirs:
- .
- liquid-base
- liquid-containers
- liquid-ghc-prim
- liquid-prelude
- git: https://github.com/ucsd-progsys/liquid-fixpoint.git
commit: e378d2ee8656da929e41c2d593a88a81e9620391
- unordered-containers-0.2.19.1@sha256:db11042bb0356c0adea277d0794743829125b4c99455af6af2bd5f7bd5e88a39,3797
allow-newer: true
nix:
packages: ["z3"]
```
And this is the error i get:
```Found "/Users/.../hie.yaml" for "/Users/.../a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.8.0.0 x86_64 ghc-9.4.2
Current directory: /Users/...
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/...
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.8.1.0
stack: 2.9.1
ghc: 8.10.7
Consulting the cradle to get project GHC version...
Project GHC version: 8.10.7
haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"]
Launching haskell-language-server exe at:/Users/.../.ghcup/tmp/ghcup-ghc-8.10.7_cabal-3.8.1.0_hls-1.8.0.0_stack-2.9.1/haskell-language-server-8.10.7
Failed to find the GHC version of this Stack project.
Error when calling stack exec ghc -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
:0:1: error:
Not in scope: ‘Control.Monad.join’
No module named ‘Control.Monad’ is imported.
:0:21: error:
Not in scope: ‘Control.Monad.fmap’
No module named ‘Control.Monad’ is imported.
:0:40: error:
Not in scope: ‘System.IO.putStr’
No module named ‘System.IO’ is imported.
:0:57: error:
Not in scope: ‘System.Environment.getExecutablePath’
No module named ‘System.Environment’ is imported.
```
Contributor guide
Assessment
This issue has not been assessed yet.