@@ -83,18 +83,11 @@ library
83
83
default-extensions : DataKinds, TypeOperators
84
84
85
85
-- Plugin flags are designed for 'cabal install haskell-language-server':
86
- -- - Packaged plugins should be manual:False
87
- -- - Non packaged plugins and bulk flags should be manual:True
88
86
-- - Bulk flags should be default:False
89
87
-- - Individual flags should be default:True
90
88
91
- flag all-plugins
92
- description : Enable all non formatter plugins
93
- default : False
94
- manual : True
95
-
96
- flag all-formatters
97
- description : Enable all fomatters
89
+ flag ignore-plugins-ghc-bounds
90
+ description : Force the inclusion of plugins even if they are not buildable by default with a specific ghc version
98
91
default : False
99
92
manual : True
100
93
@@ -196,94 +189,94 @@ common example-plugins
196
189
Ide.Plugin.Example2
197
190
198
191
common class
199
- if flag(class) || flag(all -plugins)
192
+ if flag(class) && (impl(ghc < 9.0.1 ) || flag(ignore -plugins-ghc-bounds) )
200
193
build-depends : hls-class-plugin ^>= 1.0.0.1
201
194
cpp-options : -Dclass
202
195
203
196
common callHierarchy
204
- if flag(callHierarchy) || flag(all -plugins)
197
+ if flag(callHierarchy) && (impl(ghc < 9.2.1 ) || flag(ignore -plugins-ghc-bounds) )
205
198
build-depends : hls-call-hierarchy-plugin ^>= 1.0.0.0
206
199
cpp-options : -DcallHierarchy
207
200
208
201
common haddockComments
209
- if flag(haddockComments) || flag(all-plugins)
202
+ if flag(haddockComments)
210
203
build-depends : hls-haddock-comments-plugin ^>= 1.0.0.1
211
204
cpp-options : -DhaddockComments
212
205
213
206
common eval
214
- if flag(eval) || flag(all-plugins)
207
+ if flag(eval)
215
208
build-depends : hls-eval-plugin ^>= 1.2.0.0
216
209
cpp-options : -Deval
217
210
218
211
common importLens
219
- if flag(importLens) || flag(all-plugins)
212
+ if flag(importLens)
220
213
build-depends : hls-explicit-imports-plugin ^>= 1.0.0.1
221
214
cpp-options : -DimportLens
222
215
223
216
common refineImports
224
- if flag(refineImports) || flag(all -plugins)
217
+ if flag(refineImports) && (impl(ghc < 9.2.1 ) || flag(ignore -plugins-ghc-bounds) )
225
218
build-depends : hls-refine-imports-plugin ^>= 1.0.0.0
226
219
cpp-options : -DrefineImports
227
220
228
221
common rename
229
- if flag(rename) || flag(all-plugins)
222
+ if flag(rename)
230
223
build-depends : hls-rename-plugin ^>= 1.0.0.0
231
224
cpp-options : -Drename
232
225
233
226
common retrie
234
- if flag(retrie) || flag(all -plugins)
227
+ if flag(retrie) && (impl(ghc < 9.2.1 ) || flag(ignore -plugins-ghc-bounds) )
235
228
build-depends : hls-retrie-plugin ^>= 1.0.0.1
236
229
cpp-options : -Dretrie
237
230
238
231
common tactic
239
- if flag(tactic) || flag(all -plugins)
232
+ if flag(tactic) && (impl(ghc < 9.0.1 ) || flag(ignore -plugins-ghc-bounds) )
240
233
build-depends : hls-tactics-plugin >= 1.2.0.0 && < 1.5
241
234
cpp-options : -Dtactic
242
235
243
236
common hlint
244
- if flag(hlint) || flag(all-plugins)
237
+ if flag(hlint)
245
238
build-depends : hls-hlint-plugin ^>= 1.0.0.2
246
239
cpp-options : -Dhlint
247
240
248
241
common moduleName
249
- if flag(moduleName) || flag(all-plugins)
242
+ if flag(moduleName)
250
243
build-depends : hls-module-name-plugin ^>= 1.0.0.0
251
244
cpp-options : -DmoduleName
252
245
253
246
common pragmas
254
- if flag(pragmas) || flag(all-plugins)
247
+ if flag(pragmas)
255
248
build-depends : hls-pragmas-plugin ^>= 1.0.0.0
256
249
cpp-options : -Dpragmas
257
250
258
251
common splice
259
- if flag(splice) || flag(all -plugins)
252
+ if flag(splice) && (impl(ghc < 9.2.1 ) || flag(ignore -plugins-ghc-bounds) )
260
253
build-depends : hls-splice-plugin ^>= 1.0.0.1
261
254
cpp-options : -Dsplice
262
255
263
256
-- formatters
264
257
265
258
common floskell
266
- if flag(floskell) || flag(all-formatters )
259
+ if flag(floskell) && (impl(ghc < 9.0.1 ) || flag(ignore-plugins-ghc-bounds) )
267
260
build-depends : hls-floskell-plugin ^>= 1.0.0.0
268
261
cpp-options : -Dfloskell
269
262
270
263
common fourmolu
271
- if flag(fourmolu) || flag(all-formatters )
264
+ if flag(fourmolu) && (impl(ghc < 9.2.1 ) || flag(ignore-plugins-ghc-bounds) )
272
265
build-depends : hls-fourmolu-plugin ^>= 1.0.0.0
273
266
cpp-options : -Dfourmolu
274
267
275
268
common ormolu
276
- if flag(ormolu) || flag(all-formatters)
269
+ if flag(ormolu)
277
270
build-depends : hls-ormolu-plugin ^>= 1.0.0.0
278
271
cpp-options : -Dormolu
279
272
280
273
common stylishHaskell
281
- if flag(stylishHaskell) || flag(all-formatters )
274
+ if flag(stylishHaskell) && (impl(ghc < 9.0.1 ) || flag(ignore-plugins-ghc-bounds) )
282
275
build-depends : hls-stylish-haskell-plugin ^>= 1.0.0.0
283
276
cpp-options : -DstylishHaskell
284
277
285
278
common brittany
286
- if ( flag(brittany) || flag(all-formatters ))
279
+ if flag(brittany) && (impl(ghc < 9.0.1 ) || flag(ignore-plugins-ghc-bounds ))
287
280
build-depends : hls-brittany-plugin ^>= 1.0.0.1
288
281
cpp-options : -Dbrittany
289
282
@@ -443,42 +436,16 @@ test-suite func-test
443
436
if flag(pedantic)
444
437
ghc-options : -Werror -Wredundant-constraints
445
438
446
- if flag(callHierarchy) || flag(all-plugins)
447
- cpp-options : -DcallHierarchy
448
- if flag(class) || flag(all-plugins)
449
- cpp-options : -Dclass
450
- if flag(haddockComments) || flag(all-plugins)
451
- cpp-options : -DhaddockComments
452
- if flag(eval) || flag(all-plugins)
439
+ -- Duplicating inclusion plugin conditions until tests are moved to their own packages
440
+ if flag(eval)
453
441
cpp-options : -Deval
454
- if flag(importLens) || flag(all-plugins)
455
- cpp-options : -DimportLens
456
- if flag(rename) || flag(all-plugins)
457
- cpp-options : -Drename
458
- if flag(retrie) || flag(all-plugins)
459
- cpp-options : -Dretrie
460
- if flag(tactic) || flag(all-plugins)
461
- cpp-options : -Dtactic
462
- if flag(hlint) || flag(all-plugins)
463
- cpp-options : -Dhlint
464
- if flag(moduleName) || flag(all-plugins)
465
- cpp-options : -DmoduleName
466
- if flag(pragmas) || flag(all-plugins)
467
- cpp-options : -Dpragmas
468
- if flag(splice) || flag(all-plugins)
469
- cpp-options : -Dsplice
470
-
471
442
-- formatters
472
- if flag(floskell) || flag(all-formatters )
443
+ if flag(floskell) && (impl(ghc < 9.0.1 ) || flag(ignore-plugins-ghc-bounds) )
473
444
cpp-options : -Dfloskell
474
- if flag(fourmolu) || flag(all-formatters )
445
+ if flag(fourmolu) && (impl(ghc < 9.2.1 ) || flag(ignore-plugins-ghc-bounds) )
475
446
cpp-options : -Dfourmolu
476
- if flag(ormolu) || flag(all-formatters)
447
+ if flag(ormolu)
477
448
cpp-options : -Dormolu
478
- if flag(stylishHaskell) || flag(all-formatters)
479
- cpp-options : -DstylishHaskell
480
- if (flag(brittany) || flag(all-formatters))
481
- cpp-options : -Dbrittany
482
449
483
450
test-suite wrapper-test
484
451
type : exitcode-stdio-1.0
0 commit comments