Skip to content

Commit cd34e8c

Browse files
authored
Merge branch 'master' into local-binding-type-lens
2 parents 51ef231 + efcb8e2 commit cd34e8c

File tree

80 files changed

+2621
-954
lines changed

Some content is hidden

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

80 files changed

+2621
-954
lines changed

.github/workflows/hlint.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- '**'
77

88
jobs:
9-
build10:
9+
hlint:
1010
name: "Hlint check run"
1111
runs-on: ubuntu-latest
1212
steps:
@@ -15,11 +15,12 @@ jobs:
1515
- name: 'Installing'
1616
uses: rwe/actions-hlint-setup@v1
1717
with:
18-
version: '3.3.4'
18+
version: '3.4'
1919

2020
- name: 'Checking code'
2121
uses: rwe/actions-hlint-run@v1
2222
with:
23-
hlint-bin: "hlint --with-group=extra --hint=ghcide/.hlint.yaml"
24-
path: '[ "ghcide/src", "ghcide/exe", "ghcide/bench/lib", "ghcide/bench/exe", "ghcide/bench/hist", "shake-bench/src", "ghcide/test/exe"]'
23+
hlint-bin: "hlint --with-group=extra"
24+
fail-on: error
25+
path: .
2526

.hlint.yaml

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# HLint configuration file
2+
# https://github.com/ndmitchell/hlint
3+
##########################
4+
5+
# To run HLint do:
6+
# $ hlint --git -j4
7+
8+
# Warnings currently triggered by our code
9+
- ignore: {name: "Use <$>"}
10+
- ignore: {name: "Use :"}
11+
- ignore: {name: "Redundant do"}
12+
- ignore: {name: "Avoid lambda"}
13+
- ignore: {name: "Use newtype instead of data"}
14+
- ignore: {name: "Use unless"}
15+
- ignore: {name: "Move brackets to avoid $"}
16+
- ignore: {name: "Eta reduce"}
17+
- ignore: {name: "Parse error"}
18+
- ignore: {name: "Reduce duplication"}
19+
- ignore: {name: "Use ++"}
20+
- ignore: {name: "Use $>"}
21+
- ignore: {name: "Use section"}
22+
- ignore: {name: "Use record patterns"}
23+
- ignore: {name: "Use camelCase"}
24+
- ignore: {name: "Use uncurry"}
25+
- ignore: {name: "Avoid lambda using `infix`"}
26+
27+
# Gives at least one suggestion we don't like.
28+
- ignore: {name: "Use <=<"}
29+
- ignore: {name: "Use zipFrom"}
30+
- ignore: {name: "Use zipWithFrom"}
31+
32+
# We are using the "redundant" return/pure to assign a name. We do not want to
33+
# delete it. In particular, this is not an improvement:
34+
# Found:
35+
# do options <- somethingComplicated
36+
# pure options
37+
# Perhaps:
38+
# do somethingComplicated
39+
- ignore: {name: "Redundant return"}
40+
- ignore: {name: "Redundant pure"}
41+
42+
# Off by default hints we like
43+
- warn: {name: Use module export list}
44+
45+
# Condemn nub and friends
46+
- warn: {lhs: nub (sort x), rhs: Data.List.Extra.nubSort x}
47+
- warn: {lhs: nub, rhs: Data.List.Extra.nubOrd}
48+
- warn: {lhs: nubBy, rhs: Data.List.Extra.nubOrdBy}
49+
- warn: {lhs: Data.List.Extra.nubOn, rhs: Data.List.Extra.nubOrdOn}
50+
51+
- functions:
52+
# Things that are unsafe in Haskell base library
53+
- name: unsafePerformIO
54+
within:
55+
- Development.IDE.Core.Shake
56+
- Development.IDE.GHC.Util
57+
- Development.IDE.Graph.Internal.Database
58+
- Development.IDE.Graph.Internal.Paths
59+
- Development.IDE.Graph.Internal.Profile
60+
- Ide.Types
61+
- Test.Hls
62+
- Test.Hls.Command
63+
- Wingman.Debug
64+
- Wingman.Types
65+
- AutoTupleSpec
66+
- name: unsafeInterleaveIO
67+
within:
68+
- Development.IDE.LSP.LanguageServer
69+
- {name: unsafeDupablePerformIO, within: []}
70+
- name: unsafeCoerce
71+
within:
72+
- Ide.Plugin.Eval.Code
73+
- Development.IDE.Core.Compile
74+
- Development.IDE.Types.Shake
75+
- Wingman.Judgements.SYB
76+
- Ide.Plugin.Properties
77+
78+
# Things that are a bit dangerous in the GHC API
79+
- name: nameModule
80+
within:
81+
- Development.IDE.GHC.CoreFile
82+
- Ide.Plugin.CallHierarchy.Internal
83+
- Ide.Plugin.Rename
84+
- Compat.HieBin
85+
86+
# Partial functions
87+
- name: Data.List.head
88+
within:
89+
- Main
90+
- Experiments
91+
- Development.IDE.Core.Shake
92+
- Development.IDE.Plugin.CodeAction
93+
- Development.IDE.Plugin.Completions
94+
- Development.IDE.Plugin.CodeAction.ExactPrint
95+
- Development.IDE.Session
96+
- Development.IDE.Spans.Documentation
97+
- Ide.Plugin.CallHierarchy.Internal
98+
- TExpectedActual
99+
- TRigidType
100+
- TRigidType
101+
- Ide.Plugin.Class
102+
- Wingman.Tactics
103+
104+
- name: Data.List.tail
105+
within:
106+
- Main
107+
- Development.Benchmark.Rules
108+
- Development.IDE.Plugin.CodeAction
109+
- Development.IDE.Plugin.CodeAction.ExactPrint
110+
- Development.IDE.Session
111+
- IDE.Plugin.Eval.Code
112+
- IDE.Plugin.Eval.Util
113+
- UnificationSpec
114+
115+
- name: Data.List.last
116+
within:
117+
- GenChangelogs
118+
- Main
119+
120+
- name: Data.List.init
121+
within: []
122+
123+
- name: Data.List.foldl1'
124+
within: []
125+
126+
- name: Data.List.foldr1'
127+
within: []
128+
129+
- name: "Data.List.!!"
130+
within:
131+
- Main
132+
- Experiments
133+
- FunctionalCodeAction
134+
- Development.IDE.Plugin.CodeAction
135+
- Development.IDE.Plugin.Completions.Logic
136+
- Development.IDE.Spans.Documentation
137+
- Wingman.CaseSplit
138+
- Wingman.Simplify
139+
140+
141+
- name: Data.Text.head
142+
within:
143+
- Development.IDE.Plugin.CodeAction
144+
- Development.IDE.Plugin.Completions.Logic
145+
146+
- name: Data.Foldable.foldl1
147+
within: []
148+
149+
- name: Data.Foldable.foldr1
150+
within:
151+
- Wingman.Tactics
152+
153+
- name: Data.Maybe.fromJust
154+
within:
155+
- Experiments
156+
- Main
157+
- MultipleImports
158+
- Progress
159+
- Utils
160+
- Development.IDE.Core.Compile
161+
- Development.IDE.Core.Rules
162+
- Development.IDE.Core.Shake
163+
- Development.IDE.Plugin.Completions
164+
- Development.IDE.Plugin.CodeAction.ExactPrint
165+
- Development.IDE.Test
166+
- Development.IDE.Graph.Internal.Profile
167+
- Development.IDE.Graph.Internal.Rules
168+
- Ide.Plugin.Class
169+
170+
- name: "Data.Map.!"
171+
within:
172+
- Wingman.LanguageServer
173+
174+
- name: "Data.IntMap.!"
175+
within: []
176+
177+
- name: "Data.Vector.!"
178+
within: []
179+
180+
- name: "GHC.Arr.!"
181+
within: []
182+
183+
# We really do not want novel usages of restricted functions, and mere
184+
# Warning is not enough to prevent those consistently; you need a build failure.
185+
- error: {name: Avoid restricted function}

docs/supported-versions.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ The current support for different GHC versions is given in the following table.
66

77
| GHC version | Last supporting HLS version | Deprecation status |
88
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
9-
| 9.2.1 | [current](https://github.com/haskell/haskell-language-server/releases/latest) [partial](https://github.com/haskell/haskell-language-server/issues/2179) | |
10-
| 9.0.2 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
11-
| 9.0.1 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
9+
| 9.2.3 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/2982))
10+
| 9.2.2 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/2982))
11+
| 9.2.1 | [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) | deprecated |
12+
| 9.0.2 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | |
13+
| 9.0.1 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
1214
| 8.10.7 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | |
13-
| 8.10.6 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS and HLS full support for ghc-9.0 |
15+
| 8.10.6 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
1416
| 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated |
1517
| 8.10.4 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
1618
| 8.10.3 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
@@ -35,7 +37,7 @@ Sometimes a plugin will be supported in the prebuilt binaries but not in a HLS b
3537
| Plugin | Unsupported GHC versions |
3638
|-------------------------------------|--------------------------|
3739
| `hls-alternate-number-plugin` | |
38-
| `hls-brittany-plugin` | 9.0.2(hackage), 9.2 |
40+
| `hls-brittany-plugin` | 9.2 |
3941
| `hls-call-hierarchy-plugin` | |
4042
| `hls-class-plugin` | |
4143
| `hls-eval-plugin` | |

exe/Plugins.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Development.IDE (IdeState)
1313
import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
1414
import qualified Ide.Plugin.Example as Example
1515
import qualified Ide.Plugin.Example2 as Example2
16+
import qualified Ide.Plugin.ExampleCabal as ExampleCabal
1617

1718
-- haskell-language-server optional plugins
1819
#if qualifyImportedNames
@@ -136,7 +137,7 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
136137
Floskell.descriptor "floskell" :
137138
#endif
138139
#if fourmolu
139-
Fourmolu.descriptor "fourmolu" :
140+
Fourmolu.descriptor pluginRecorder "fourmolu" :
140141
#endif
141142
#if tactic
142143
Tactic.descriptor pluginRecorder "tactics" :
@@ -160,7 +161,7 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
160161
CallHierarchy.descriptor :
161162
#endif
162163
#if class
163-
Class.descriptor "class" :
164+
Class.descriptor pluginRecorder "class" :
164165
#endif
165166
#if haddockComments
166167
HaddockComments.descriptor "haddockComments" :
@@ -204,4 +205,5 @@ idePlugins recorder includeExamples = pluginDescToIdePlugins allPlugins
204205
examplePlugins =
205206
[Example.descriptor pluginRecorder "eg"
206207
,Example2.descriptor pluginRecorder "eg2"
208+
,ExampleCabal.descriptor pluginRecorder "ec"
207209
]

0 commit comments

Comments
 (0)