haskell / haskell/haskell-language-server
Codelens: Not documented dependency on Prelude (NoImplicitPrelude EXT ON, causing it to output nothing)
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
### Your environment
Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`:
```sh
I ~/.c/C/U/g/haskell.haskell > ./haskell-language-server-wrapper-0.9.0-linux --probe-tools 2021年02月05日 05時14分36秒
haskell-language-server version: 0.9.0.0 (GHC: 8.10.1) (PATH: /home/pe200012/.config/Code - Insiders/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-0.9.0-linux) (GIT hash: 46d2a3dc7ef49ba57b2706022af1801149ab3f2b)
Tool versions found on the $PATH
cabal: 2.4.1.0
stack: 2.5.1
ghc: Not found
```
Which lsp-client do you use: VS Haskell Extension
Describe your project (alternative: link to the project): https://github.com/pe200012/TAPL-Practice
Contents of `hie.yaml`:
```yaml
cradle:
stack:
- path: "./src"
component: "TAPL-Practice:lib"
- path: "./app/Main.hs"
component: "TAPL-Practice:exe:TAPL-Practice-exe"
- path: "./app/Paths_TAPL_Practice.hs"
component: "TAPL-Practice:exe:TAPL-Practice-exe"
- path: "./test"
component: "TAPL-Practice:test:TAPL-Practice-test"
```
### Steps to reproduce
```haskell
-- main.hs
{-# LANGUAGE NoImplicitPrelude #-}
module Main where
-- >>> 1
```
### Expected behaviour
A plain "1" should appear under the evaluation statement when clicking `Evaluate...`
### Actual behaviour
Nothing happens, even without an error message!
### What I found
I found that you'd need these types imported from Prelude to make codelens available:
```haskell
String,
Monad((>>=), (>>), return),
(.),
Show(..),
IO
```
It's frustrating that there isn't even a single word talking about the dependency on it. It took about several hours for me to figure out the cause.
I wonder if you could add this information to the tutorial, which would help a lot when others encounter the same issue like me. Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.