Skip to content

Commit 22fab55

Browse files
committed
Merge master
2 parents 4882005 + 2121495 commit 22fab55

File tree

108 files changed

+2283
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2283
-546
lines changed

.github/workflows/caching.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ jobs:
8080
strategy:
8181
fail-fast: false
8282
matrix:
83-
ghc: [ "9.2.2"
83+
ghc: [ "9.2.3"
84+
, "9.2.2"
8485
, "9.0.2"
85-
, "9.0.1"
8686
, "8.10.7"
87-
, "8.10.6"
8887
, "8.8.4"
8988
, "8.6.5"
9089
]
@@ -118,7 +117,7 @@ jobs:
118117
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
119118
env:
120119
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
121-
CPATH:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi":$CPATH
120+
CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
122121

123122
# We build ghcide with benchs and test enabled to include its dependencies in the cache
124123
# (including shake-bench)

.github/workflows/flags.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: true
4646
matrix:
47-
ghc: [ "9.2.2"
47+
ghc: [ "9.2.3"
4848
, "9.0.2"
4949
, "8.10.7"
5050
, "8.8.4"
@@ -68,7 +68,7 @@ jobs:
6868
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe ekg"
6969

7070
# we have to clean up warnings for 9.0 and 9.2 before enable -WAll
71-
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.2'
71+
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.3'
7272
name: Build with pedantic (-WError)
7373
run: cabal v2-build --flags="pedantic"
7474

.github/workflows/test.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ jobs:
5757
strategy:
5858
fail-fast: true
5959
matrix:
60-
ghc: [ "9.2.2"
60+
ghc: [ "9.2.3"
61+
, "9.2.2"
6162
, "9.0.2"
62-
, "9.0.1"
6363
, "8.10.7"
64-
, "8.10.6"
6564
, "8.8.4"
6665
, "8.6.5"
6766
]
@@ -71,7 +70,7 @@ jobs:
7170
include:
7271
# only test supported ghc major versions
7372
- os: ubuntu-latest
74-
ghc: '9.2.2'
73+
ghc: '9.2.3'
7574
test: true
7675
- os: ubuntu-latest
7776
ghc: '9.0.2'
@@ -86,7 +85,7 @@ jobs:
8685
ghc: '8.6.5'
8786
test: true
8887
- os: windows-latest
89-
ghc: '9.2.2'
88+
ghc: '9.2.3'
9089
test: true
9190
- os: windows-latest
9291
ghc: '9.0.2'
@@ -98,12 +97,10 @@ jobs:
9897
ghc: '8.6.5'
9998
test: true
10099
# only build rest of supported ghc versions for windows
101-
- os: windows-latest
102-
ghc: '9.0.1'
103-
- os: windows-latest
104-
ghc: '8.10.6'
105100
- os: windows-latest
106101
ghc: '8.8.4'
102+
- os: windows-latest
103+
ghc: '9.2.2'
107104

108105
steps:
109106
- uses: actions/checkout@v3
@@ -162,7 +159,7 @@ jobs:
162159
HLS_WRAPPER_TEST_EXE: hls-wrapper
163160
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"
164161

165-
- if: matrix.test && matrix.ghc != '9.2.2'
162+
- if: matrix.test && matrix.ghc != '9.2.3'
166163
name: Test hls-brittany-plugin
167164
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
168165

@@ -182,11 +179,11 @@ jobs:
182179
name: Test hls-eval-plugin
183180
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"
184181

185-
- if: matrix.test && matrix.ghc != '9.2.2'
182+
- if: matrix.test && matrix.ghc != '9.2.3'
186183
name: Test hls-haddock-comments-plugin
187184
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"
188185

189-
- if: matrix.test && matrix.ghc != '9.2.2'
186+
- if: matrix.test && matrix.ghc != '9.2.3'
190187
name: Test hls-splice-plugin
191188
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"
192189

@@ -202,7 +199,7 @@ jobs:
202199
name: Test hls-fourmolu-plugin
203200
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
204201

205-
- if: matrix.test && matrix.ghc != '9.2.2'
202+
- if: matrix.test && matrix.ghc != '9.2.3'
206203
name: Test hls-tactics-plugin test suite
207204
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
208205

@@ -246,6 +243,10 @@ jobs:
246243
name: Test hls-change-type-signature test suite
247244
run: cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS"
248245

246+
- if: matrix.test
247+
name: Test hls-gadt-plugin test suit
248+
run: cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-gadt-plugin --test-options="$TEST_OPTS"
249+
249250
test_post_job:
250251
if: always()
251252
runs-on: ubuntu-latest

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variables:
1919
CABAL_PROJECT: cabal.project
2020
- GHC_VERSION: 9.2.2
2121
CABAL_PROJECT: cabal.project
22-
- GHC_VERSION: 9.2.1
22+
- GHC_VERSION: 9.2.3
2323
CABAL_PROJECT: cabal.project
2424

2525
workflow:

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/plugins/hls-explicit-imports-plugin @pepeiborra
1616
/plugins/hls-floskell-plugin @Ailrun
1717
/plugins/hls-fourmolu-plugin @georgefst
18+
/plugins/hls-gadt-plugin @July541
1819
/plugins/hls-haddock-comments-plugin @berberman
1920
/plugins/hls-hlint-plugin @jneira @eddiemundo
2021
/plugins/hls-module-name-plugin

bindist/ghcs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
8.8.4,cabal.project
33
8.10.7,cabal.project
44
9.0.2,cabal.project
5-
9.2.1,cabal.project
65
9.2.2,cabal.project
6+
9.2.3,cabal.project

bindist/ghcs-Msys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
8.10.7,cabal.project
22
9.0.2,cabal.project
33
9.2.2,cabal.project
4-
9.2.1,cabal.project
4+
9.2.3,cabal.project

cabal.project

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ packages:
2828
./plugins/hls-qualify-imported-names-plugin
2929
./plugins/hls-selection-range-plugin
3030
./plugins/hls-change-type-signature-plugin
31+
./plugins/hls-gadt-plugin
3132

3233
-- Standard location for temporary packages needed for particular environments
3334
-- For example it is used in the project gitlab mirror to help in the MAcOS M1 build script
@@ -43,7 +44,7 @@ package *
4344

4445
write-ghc-environment-files: never
4546

46-
index-state: 2022-04-30T21:02:45Z
47+
index-state: 2022-06-12T00:00:00Z
4748

4849
constraints:
4950
hyphenation +embed,
@@ -66,26 +67,5 @@ allow-newer:
6667
-- ghc-9.2
6768
----------
6869
hiedb:base,
69-
retrie:ghc-exactprint,
7070

71-
-- for brittany
72-
-- https://github.com/lspitzner/multistate/pull/8
73-
multistate:base,
74-
-- https://github.com/lspitzner/data-tree-print/pull/3
75-
data-tree-print:base,
76-
-- https://github.com/lspitzner/butcher/pull/8
77-
butcher:base,
78-
79-
-- for shake-bench
80-
Chart:lens,
81-
Chart-diagrams:lens,
82-
83-
-- for ekg
84-
ekg-core:base,
85-
ekg-core:ghc-prim,
86-
ekg-wai:base,
87-
ekg-wai:time,
88-
89-
-- for shake-bench
90-
Chart-diagrams:diagrams-core,
91-
SVGFonts:diagrams-core
71+
ekg-wai:time

docs/features.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,19 @@ Known Limitations:
256256

257257
![Change Type Signature Demo](../plugins/hls-change-type-signature-plugin/change2.gif)
258258

259-
[Link to Docs](../plugins/hls-change-type-signature/README.md)
259+
![Link to Docs](../plugins/hls-change-type-signature-plugin/README.md)
260+
261+
### Convert to GADT syntax
262+
263+
Provided by: `hls-gadt-plugin`
264+
265+
Code action kind: `refactor.rewrite`
266+
267+
Convert a datatype to GADT syntax.
268+
269+
![GADT Demo](../plugins/hls-gadt-plugin/gadt.gif)
270+
271+
![Link to Docs](../plugins/hls-gadt-plugin/README.md)
260272

261273
## Code lenses
262274

@@ -274,6 +286,13 @@ Evaluates code blocks in comments with a click. [Tutorial](https://github.com/ha
274286

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

289+
Known limitations:
290+
291+
- Standard input is shared with HLS, so e.g. [`getLine` breaks the connection to server](https://github.com/haskell/haskell-language-server/issues/2913).
292+
- Standard (error) output [is not captured](https://github.com/haskell/haskell-language-server/issues/1977).
293+
- While similar to [doctest](https://hackage.haskell.org/package/doctest), some of its features are unsupported,
294+
see [Differences with doctest](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md#differences-with-doctest).
295+
277296
### Make import lists fully explicit code lens
278297

279298
Provided by: `hls-explicit-imports-plugin`

docs/installation.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ In addition make sure `haskell-language-server.exe` is not running by closing yo
110110
### Download the source code
111111

112112
```bash
113-
git clone https://github.com/haskell/haskell-language-server --recurse-submodules
113+
git clone https://github.com/haskell/haskell-language-server
114114
cd haskell-language-server
115115
```
116116

@@ -136,18 +136,9 @@ To install, download the `haskell-language-server-wrapper` executable for your p
136136
## Arch Linux
137137

138138
The preferred method of installation for development purposes is to use the [haskell-language-server-static](https://aur.archlinux.org/packages/haskell-language-server-static) package from AUR.
139-
This package contains statically linked binaries for each supported GHC version and `haskell-language-server-wrapper` for automatic GHC version selection.
139+
This package contains pre-built binaries for each supported GHC version and `haskell-language-server-wrapper` for automatic GHC version selection.
140140
It is updated regularly, requires no additional dependencies, and is independent of other haskell packages you may have on your system, including GHC.
141-
Its size is relatively large (approx. 900 MB), but if this is a problem for you, during installation you can disable the GHC versions you will not be using by editing the PKGBUILD file.
142141

143-
Alternatively, if you want to use **dynamically linked** Haskell packages from `pacman`,
144-
you can install the latest pre-compiled version of `haskell-language-server` from [[community]](https://archlinux.org/packages/community/x86_64/haskell-language-server/):
145-
146-
```bash
147-
sudo pacman -S haskell-language-server
148-
```
149-
150-
In this case, `haskell-language-server` is compiled against the GHC distributed to Arch Linux, so you will need maintain a system wide Haskell development environment, and install GHC from `pacman` as well.
151142
See [ArchWiki](https://wiki.archlinux.org/index.php/Haskell) for the details of Haskell infrastructure on Arch Linux.
152143

153144
## Fedora

docs/supported-versions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Sometimes a plugin will be supported in the prebuilt binaries but not in a HLS b
5555
| `hls-stylish-haskell-plugin` | |
5656
| `hls-tactics-plugin` | 9.2 |
5757
| `hls-selection-range-plugin` | |
58+
| `hls-gadt-plugin` | |
5859

5960
### Using deprecated GHC versions
6061

exe/Plugins.hs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ import Ide.Plugin.SelectionRange as SelectionRange
8282
#if changeTypeSignature
8383
import Ide.Plugin.ChangeTypeSignature as ChangeTypeSignature
8484
#endif
85+
86+
#if gadt
87+
import Ide.Plugin.GADT as GADT
88+
#endif
8589
-- formatters
8690

8791
#if floskell
@@ -132,7 +136,7 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
132136
Floskell.descriptor "floskell" :
133137
#endif
134138
#if fourmolu
135-
Fourmolu.descriptor "fourmolu" :
139+
Fourmolu.descriptor pluginRecorder "fourmolu" :
136140
#endif
137141
#if tactic
138142
Tactic.descriptor pluginRecorder "tactics" :
@@ -153,7 +157,7 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
153157
Brittany.descriptor "brittany" :
154158
#endif
155159
#if callHierarchy
156-
CallHierarchy.descriptor "callHierarchy":
160+
CallHierarchy.descriptor :
157161
#endif
158162
#if class
159163
Class.descriptor pluginRecorder "class" :
@@ -183,13 +187,16 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
183187
Splice.descriptor "splice" :
184188
#endif
185189
#if alternateNumberFormat
186-
AlternateNumberFormat.descriptor pluginRecorder "alternateNumberFormat" :
190+
AlternateNumberFormat.descriptor pluginRecorder :
187191
#endif
188192
#if selectionRange
189193
SelectionRange.descriptor "selectionRange" :
190194
#endif
191195
#if changeTypeSignature
192-
ChangeTypeSignature.descriptor "changeTypeSignature" :
196+
ChangeTypeSignature.descriptor :
197+
#endif
198+
#if gadt
199+
GADT.descriptor "gadt" :
193200
#endif
194201
-- The ghcide descriptors should come last so that the notification handlers
195202
-- (which restart the Shake build) run after everything else

0 commit comments

Comments
 (0)