Skip to content

Commit 9f90bc7

Browse files
committed
Correct ghc version
1 parent 18cb567 commit 9f90bc7

File tree

1 file changed

+39
-33
lines changed

1 file changed

+39
-33
lines changed

README.md

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Haskell for Visual Studio Code
22

3-
[![](https://vsmarketplacebadge.apphb.com/version/haskell.haskell.svg)](https://marketplace.visualstudio.com/items?itemName=haskell.haskell)
3+
[![vsmarketplacebadge](https://vsmarketplacebadge.apphb.com/version/haskell.haskell.svg)](https://marketplace.visualstudio.com/items?itemName=haskell.haskell)
44

55
This extension adds language support for [Haskell](https://haskell.org), powered by the [Haskell Language Server](https://github.com/haskell/haskell-language-server).
66

@@ -12,27 +12,37 @@ This extension adds language support for [Haskell](https://haskell.org), powered
1212
- Document symbols
1313
- Highlight references in document
1414
- Code completion
15-
- Formatting via Brittany, Floskell, Ormolu or Stylish Haskell
15+
- Formatting via Brittany, Floskell, Fourmolu, Ormolu or Stylish Haskell
1616
- [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support
1717
- Code evaluation (Haskell Language Server), see ([Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md))
1818

19-
![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif)
19+
![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif)
2020

21-
## Requirements
21+
- Integration with [retrie](https://hackage.haskell.org/package/retrie)
2222

23-
- For standalone `.hs`/`.lhs` files, [ghc](https://www.haskell.org/ghc/) must be installed and on the PATH. The easiest way to install it is with [ghcup](https://www.haskell.org/ghcup/) or [Chocolatey](https://www.haskell.org/platform/windows.html) on Windows.
24-
- For Cabal based projects, both ghc and [cabal-install](https://www.haskell.org/cabal/) must be installed and on the PATH. It can also be installed with [ghcup](https://www.haskell.org/ghcup/) or [Chocolatey](https://www.haskell.org/platform/windows.html) on Windows.
25-
- For Stack based projects, [stack](http://haskellstack.org) must be installed and on the PATH.
23+
![Retrie Demo](https://i.imgur.com/Ev7B87k.gif)
24+
25+
- Code lenses for explicit import lists
26+
27+
![Imports code lens Demo](https://imgur.com/pX9kvY4.gif)
2628

27-
## Language Servers
29+
- Generate functions from type signatures, and intelligently complete holes using [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin)
2830

29-
Whilst this extension is powered by the Haskell Language Server by default, it also supports several others which can be manually installed:
31+
![Wingman Demo](https://user-images.githubusercontent.com/307223/92657198-3d4be400-f2a9-11ea-8ad3-f541c8eea891.gif)
3032

31-
- [Haskell Language Server](https://github.com/haskell/haskell-language-server#installation): This is the default language server which will automatically be downloaded, so it does not need manual installation. It builds upon ghcide by providing extra plugins and features.
32-
- [ghcide](https://github.com/digital-asset/ghcide#install-ghcide): A fast and reliable LSP server with support for [basic features](https://github.com/digital-asset/ghcide#features).
33-
- [Haskell IDE Engine](https://github.com/haskell/haskell-ide-engine#installation): A legacy language server, you probably shouldn't use this one. Haskell Language Server replaces it instead.
33+
- Integration with [hlint](https://github.com/ndmitchell/hlint) to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact)
3434

35-
You can choose which language server to use from the "Haskell > Language Server Variant" configuration option.
35+
![Hlint Demo](https://user-images.githubusercontent.com/54035/110860028-8f9fa900-82bc-11eb-9fe5-6483d8bb95e6.gif)
36+
37+
- Module name suggestions for insertion or correction
38+
39+
![Module Name Demo](https://user-images.githubusercontent.com/54035/110860755-78ad8680-82bd-11eb-9845-9ea4b1cc1f76.gif)
40+
41+
## Requirements
42+
43+
- For standalone `.hs`/`.lhs` files, [ghc](https://www.haskell.org/ghc/) must be installed and on the PATH. The easiest way to install it is with [ghcup](https://www.haskell.org/ghcup/) or [Chocolatey](https://www.haskell.org/platform/windows.html) on Windows.
44+
- For Cabal based projects, both ghc and [cabal-install](https://www.haskell.org/cabal/) must be installed and on the PATH. It can also be installed with [ghcup](https://www.haskell.org/ghcup/) or [Chocolatey](https://www.haskell.org/platform/windows.html) on Windows.
45+
- For Stack based projects, [stack](http://haskellstack.org) must be installed and on the PATH.
3646

3747
## Configuration options
3848

@@ -49,8 +59,6 @@ There are a few placeholders which will be expanded:
4959
- `~`, `${HOME}` and `${home}` will be expanded into your users' home folder.
5060
- `${workspaceFolder}` and `${workspaceRoot}` will expand into your current project root.
5161

52-
## Haskell Language Server specifics
53-
5462
### Local documentation
5563

5664
Haskell Language Server can display Haddock documentation on hover and completions if the project and
@@ -59,19 +67,23 @@ its dependencies have been built with the `-haddock` GHC flag.
5967
- For cabal:
6068

6169
- Add to your global config file (e.g. `~/.cabal/config`):
62-
```
70+
71+
```yaml
6372
program-default-options
6473
ghc-options: -haddock
6574
```
75+
6676
- Or, for a single project, run `cabal configure --ghc-options=-haddock`
6777

6878
- For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`:
69-
```
79+
80+
```yaml
7081
ghc-options:
71-
"$everything": -haddock
82+
'$everything': -haddock
7283
```
84+
7385
Note that this flag will cause compilation errors if a dependency contains invalid Haddock markup,
74-
until GHC 8.12 which [will report warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377)
86+
until GHC 9.0 which [will report warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377)
7587
instead.
7688

7789
### Downloaded binaries
@@ -101,7 +113,7 @@ These are the versions of GHC that there are binaries of `haskell-language-serve
101113
| 8.6.5 | ✓ | ✓ | ✓ |
102114
| 8.6.4 | ✓ | ✓ | ✓ |
103115

104-
The exact list of binaries can be checked in the last release of haskell-language-server: https://github.com/haskell/haskell-language-server/releases/latest
116+
The exact list of binaries can be checked in the last release of haskell-language-server: <https://github.com/haskell/haskell-language-server/releases/latest>
105117

106118
## Using multi-root workspaces
107119

@@ -111,25 +123,19 @@ The language server is now started for each workspace folder you have in your mu
111123

112124
## Investigating and reporting problems
113125

114-
1. Go to extensions and right click `Haskell Language Server` and choose `Extensions Settings`
115-
2. Scroll down to `Language Server Haskell › Trace: Server` and set it to `messages`
116-
3. Restart vscode and reproduce your problem
117-
4. Go to the main menu and choose `View -> Output` (`Ctrl + Shift + U`)
118-
5. On the new Output panel that opens on the right side in the drop down menu choose `Haskell (<your project>)`
126+
1. Go to extensions and right click `Haskell Language Server` and choose `Extensions Settings`
127+
2. Scroll down to `Language Server Haskell › Trace: Server` and set it to `messages`
128+
3. Restart vscode and reproduce your problem
129+
4. Go to the main menu and choose `View -> Output` (`Ctrl + Shift + U`)
130+
5. On the new Output panel that opens on the right side in the drop down menu choose `Haskell (<your project>)`
119131

120-
Please include the output when filing any issues on the relevant language server's issue tracker.
132+
Please include the output when filing any issues on the [haskell-language-server](https://github.com/haskell/haskell-language-server/issues/new) issue tracker.
121133

122134
### Troubleshooting
123135

124136
- Sometimes the language server might get stuck in a rut and stop responding to your latest changes.
125137
Should this occur you can try restarting the language server with <kbd>Ctrl</kbd> <kbd>shift</kbd> <kbd>P</kbd>/<kbd>⌘</kbd> <kbd>shift</kbd> <kbd>P</kbd> > Restart Haskell LSP Server.
126-
- Usually the error or unexpected behaviour is already reported in the haskell language server [used by the extension](#hie-variant). Finding the issue in its issue tracker could be useful to help resolve it. Sometimes even it includes a workaround for the issue.
127-
- Haskell language servers issue trackers:
128-
- haskell-language-server: https://github.com/haskell/haskell-language-server/issues
129-
- ghcide: https://github.com/haskell/ghcide/issues
130-
- _Common issues_:
131-
- For now, the extension is not able to open a single haskell source file. You need to open a workspace or folder, configured to be built with cabal, stack or other hie-bios compatible program.
132-
- Check you don't have other haskell extensions active, they can interfere with each other.
138+
- Usually the error or unexpected behaviour is already reported in the [haskell language server issue tracker](https://github.com/haskell/haskell-language-server/issues). Finding the issue could be useful to help resolve it and sometimes includes a workaround for the issue.
133139

134140
## Contributing
135141

0 commit comments

Comments
 (0)