forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaskell-language-server.cabal
640 lines (550 loc) · 15.3 KB
/
haskell-language-server.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
cabal-version: 3.0
category: Development
name: haskell-language-server
version: 2.6.0.0
synopsis: LSP server for GHC
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
homepage: https://github.com/haskell/haskell-language-server#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues
author: The Haskell IDE Team
maintainer: [email protected]
copyright: The Haskell IDE Team
license: Apache-2.0
license-file: LICENSE
build-type: Simple
tested-with: GHC == 9.0.2 || ==9.2.5
extra-source-files:
README.md
ChangeLog.md
test/testdata/**/*.project
test/testdata/**/*.cabal
test/testdata/**/*.yaml
test/testdata/**/*.hs
bindist/wrapper.in
flag pedantic
description: Enable -Werror
default: False
manual: True
source-repository head
type: git
location: https://github.com/haskell/haskell-language-server
common common-deps
build-depends:
, base >=4.12 && <5
, directory
, extra
, filepath
, text
, prettyprinter >= 1.7
-- Default warnings in HLS
common warnings
ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors
-- Allow compiling in pedantic mode
common pedantic
if flag(pedantic)
ghc-options: -Werror
-- Plugin flags are designed for 'cabal install haskell-language-server':
-- - Bulk flags should be default:False
-- - Individual flags should be default:True
-- The intent of this flag is being able to keep the ghc condition for hackage
-- but skip it via flags in cabal.project as plugins for new ghcs usually
-- are buildable using cabal.project tweaks
flag ignore-plugins-ghc-bounds
description: Force the inclusion of plugins even if they are not buildable by default with a specific ghc version
default: False
manual: True
flag cabal
description: Enable cabal plugin
default: True
manual: True
flag class
description: Enable class plugin
default: True
manual: True
flag callHierarchy
description: Enable call hierarchy plugin
default: True
manual: True
flag eval
description: Enable eval plugin
default: True
manual: True
flag importLens
description: Enable importLens plugin
default: True
manual: True
flag rename
description: Enable rename plugin
default: True
manual: True
flag retrie
description: Enable retrie plugin
default: True
manual: True
flag hlint
description: Enable hlint plugin
default: True
manual: True
flag stan
description: Enable stan plugin
default: True
manual: True
flag moduleName
description: Enable moduleName plugin
default: True
manual: True
flag pragmas
description: Enable pragmas plugin
default: True
manual: True
flag splice
description: Enable splice plugin
default: True
manual: True
flag alternateNumberFormat
description: Enable Alternate Number Format plugin
default: True
manual: True
flag qualifyImportedNames
description: Enable qualifyImportedNames plugin
default: True
manual: True
flag codeRange
description: Enable Code Range plugin
default: True
manual: True
flag changeTypeSignature
description: Enable changeTypeSignature plugin
default: True
manual: True
flag gadt
description: Enable gadt plugin
default: True
manual: True
flag explicitFixity
description: Enable explicitFixity plugin
default: True
manual: True
flag explicitFields
description: Enable explicitFields plugin
default: True
manual: True
flag overloadedRecordDot
description: Enable overloadedRecordDot plugin
default: True
manual: True
flag semanticTokens
description: Enable semantic tokens plugin
default: True
manual: True
-- formatters
flag floskell
description: Enable floskell plugin
default: True
manual: True
flag fourmolu
description: Enable fourmolu plugin
default: True
manual: True
flag ormolu
description: Enable ormolu plugin
default: True
manual: True
flag stylishHaskell
description: Enable stylishHaskell plugin
default: True
manual: True
flag refactor
description: Enable refactor plugin
default: True
manual: True
flag dynamic
description: Build with the dyn rts
default: True
manual: True
flag cabalfmt
description: Enable cabal-fmt plugin
default: True
manual: True
common cabalfmt
if flag(cabalfmt)
build-depends: hls-cabal-fmt-plugin == 2.6.0.0
cpp-options: -Dhls_cabalfmt
common cabal
if flag(cabal)
build-depends: hls-cabal-plugin == 2.6.0.0
cpp-options: -Dhls_cabal
common class
if flag(class)
build-depends: hls-class-plugin == 2.6.0.0
cpp-options: -Dhls_class
common callHierarchy
if flag(callHierarchy)
build-depends: hls-call-hierarchy-plugin == 2.6.0.0
cpp-options: -Dhls_callHierarchy
common eval
if flag(eval)
build-depends: hls-eval-plugin == 2.6.0.0
cpp-options: -Dhls_eval
common importLens
if flag(importLens)
build-depends: hls-explicit-imports-plugin == 2.6.0.0
cpp-options: -Dhls_importLens
common rename
if flag(rename)
build-depends: hls-rename-plugin == 2.6.0.0
cpp-options: -Dhls_rename
common retrie
if flag(retrie)
build-depends: hls-retrie-plugin == 2.6.0.0
cpp-options: -Dhls_retrie
common hlint
if flag(hlint) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-hlint-plugin == 2.6.0.0
cpp-options: -Dhls_hlint
common stan
if flag(stan) && (impl(ghc > 8.8.1) && impl(ghc <= 9.2.3) || impl(ghc >= 9.4.0) && impl(ghc < 9.10.0))
build-depends: hls-stan-plugin == 2.6.0.0
cpp-options: -Dhls_stan
common moduleName
if flag(moduleName)
build-depends: hls-module-name-plugin == 2.6.0.0
cpp-options: -Dhls_moduleName
common pragmas
if flag(pragmas)
build-depends: hls-pragmas-plugin == 2.6.0.0
cpp-options: -Dhls_pragmas
common splice
if flag(splice)
build-depends: hls-splice-plugin == 2.6.0.0
cpp-options: -Dhls_splice
common alternateNumberFormat
if flag(alternateNumberFormat)
build-depends: hls-alternate-number-format-plugin == 2.6.0.0
cpp-options: -Dhls_alternateNumberFormat
common qualifyImportedNames
if flag(qualifyImportedNames)
build-depends: hls-qualify-imported-names-plugin == 2.6.0.0
cpp-options: -Dhls_qualifyImportedNames
common codeRange
if flag(codeRange)
build-depends: hls-code-range-plugin == 2.6.0.0
cpp-options: -Dhls_codeRange
common changeTypeSignature
if flag(changeTypeSignature)
build-depends: hls-change-type-signature-plugin == 2.6.0.0
cpp-options: -Dhls_changeTypeSignature
common gadt
if flag(gadt)
build-depends: hls-gadt-plugin == 2.6.0.0
cpp-options: -Dhls_gadt
common explicitFixity
if flag(explicitFixity)
build-depends: hls-explicit-fixity-plugin == 2.6.0.0
cpp-options: -DexplicitFixity
common explicitFields
if flag(explicitFields)
build-depends: hls-explicit-record-fields-plugin == 2.6.0.0
cpp-options: -DexplicitFields
common overloadedRecordDot
if flag(overloadedRecordDot)
build-depends: hls-overloaded-record-dot-plugin == 2.6.0.0
cpp-options: -Dhls_overloaded_record_dot
-- formatters
common floskell
if flag(floskell) && (impl(ghc < 9.7) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-floskell-plugin == 2.6.0.0
cpp-options: -Dhls_floskell
common fourmolu
if flag(fourmolu)
build-depends: hls-fourmolu-plugin == 2.6.0.0
cpp-options: -Dhls_fourmolu
common ormolu
if flag(ormolu)
build-depends: hls-ormolu-plugin == 2.6.0.0
cpp-options: -Dhls_ormolu
common stylishHaskell
if flag(stylishHaskell) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-stylish-haskell-plugin == 2.6.0.0
cpp-options: -Dhls_stylishHaskell
common refactor
if flag(refactor)
build-depends: hls-refactor-plugin == 2.6.0.0
cpp-options: -Dhls_refactor
common semanticTokens
if flag(semanticTokens)
build-depends: hls-semantic-tokens-plugin == 2.6.0.0
cpp-options: -Dhls_semanticTokens
library
import: common-deps
-- configuration
, warnings
, pedantic
-- plugins
, cabal
, callHierarchy
, cabalfmt
, changeTypeSignature
, class
, eval
, importLens
, rename
, retrie
, hlint
, stan
, moduleName
, pragmas
, splice
, alternateNumberFormat
, qualifyImportedNames
, codeRange
, gadt
, explicitFixity
, explicitFields
, floskell
, fourmolu
, ormolu
, stylishHaskell
, refactor
, overloadedRecordDot
, semanticTokens
exposed-modules:
Ide.Arguments
Ide.Main
Ide.Version
HlsPlugins
other-modules: Paths_haskell_language_server
autogen-modules: Paths_haskell_language_server
hs-source-dirs: src
build-depends:
, async
, base16-bytestring
, bytestring
, containers
, cryptohash-sha1
, data-default
, ghc
, ghcide == 2.6.0.0
, githash >=0.1.6.1
, lsp >= 2.3.0.0
, hie-bios
, hiedb
, hls-plugin-api == 2.6.0.0
, optparse-applicative
, optparse-simple
, process
, hls-graph
, safe-exceptions
, sqlite-simple
, unordered-containers
, aeson-pretty
default-language: Haskell2010
default-extensions: DataKinds, TypeOperators
executable haskell-language-server
import: common-deps
-- configuration
, warnings
, pedantic
main-is: Main.hs
hs-source-dirs: exe
ghc-options:
-threaded
-- allow user RTS overrides
-rtsopts
-- disable idle GC
-- increase nursery size
-- Enable collection of heap statistics
"-with-rtsopts=-I0 -A128M -T"
-Wno-unticked-promoted-constructors
if flag(pedantic)
ghc-options: -Werror
if !os(windows) && flag(dynamic)
-- We want to link against the dyn rts just like official GHC binaries do;
-- the linked rts determines how external libs are loaded dynamically by TH.
-- The standard way of doing this is via the --enable-dynamic-executables Cabal option
-- Unfortunately it doesnt' work, see https://github.com/haskell/haskell-language-server/issues/2659
-- One can use --ghc-options=-dynamic but this gets applied to the dependencies as well,
-- which results in massive rebuilds and incompatibilities with profiling.
-- So instead we set the -dynamic flag diretly here.
ghc-options: -dynamic
build-depends:
, aeson
, async
, base16-bytestring
, binary
, bytestring
, containers
, cryptohash-sha1
, deepseq
, ghc
, ghc-boot-th
, ghcide
, hashable
, haskell-language-server
, lsp
, hie-bios
, hiedb
, lens
, regex-tdfa
, optparse-applicative
, hls-plugin-api
, lens
, mtl
, regex-tdfa
, safe-exceptions
, hls-graph
, sqlite-simple
, stm
, temporary
, transformers
, unordered-containers
default-language: Haskell2010
default-extensions: DataKinds, TypeOperators
executable haskell-language-server-wrapper
import: common-deps
, warnings
, pedantic
main-is: Wrapper.hs
hs-source-dirs: exe
other-modules: Paths_haskell_language_server
autogen-modules: Paths_haskell_language_server
ghc-options:
-threaded
-- allow user RTS overrides
-rtsopts
-- disable idle GC
-- increase nursery size
"-with-rtsopts=-I0 -A128M"
build-depends:
, data-default
, ghc
, ghc-paths
, ghcide
, gitrev
, haskell-language-server
, hie-bios
, hls-plugin-api
, lsp
, lsp-types
, mtl
, optparse-applicative
, optparse-simple
, process
, transformers
, unliftio-core
if !os(windows)
build-depends:
unix
, containers
default-language: Haskell2010
test-suite func-test
import: common-deps
, warnings
, pedantic
, refactor
type: exitcode-stdio-1.0
default-language: Haskell2010
build-tool-depends:
haskell-language-server:haskell-language-server -any,
ghcide:ghcide-test-preprocessor -any
build-depends:
, bytestring
, data-default
, deepseq
, hashable
, lens
, lens-aeson
, ghcide
, ghcide-test-utils
, hls-test-utils == 2.6.0.0
, lsp-types
, aeson
, hls-plugin-api
, lsp-test
, containers
, unordered-containers
, row-types
hs-source-dirs: test/functional test/utils
main-is: Main.hs
other-modules:
Config
ConfigSchema
Format
FunctionalBadProject
HieBios
Progress
Test.Hls.Command
Test.Hls.Flags
default-extensions: OverloadedStrings
ghc-options:
-threaded -rtsopts -with-rtsopts=-N
-- Duplicating inclusion plugin conditions until tests are moved to their own packages
if flag(eval)
cpp-options: -Dhls_eval
-- formatters
if flag(floskell)
cpp-options: -Dhls_floskell
if flag(fourmolu)
cpp-options: -Dhls_fourmolu
if flag(ormolu)
cpp-options: -Dhls_ormolu
test-suite wrapper-test
import: common-deps
, warnings
, pedantic
type: exitcode-stdio-1.0
build-tool-depends:
haskell-language-server:haskell-language-server-wrapper -any,
haskell-language-server:haskell-language-server -any
default-language: Haskell2010
build-depends:
process
, hls-test-utils
hs-source-dirs: test/wrapper
main-is: Main.hs
benchmark benchmark
-- Depends on shake-bench which is unbuildable after this point
if impl(ghc >= 9.5)
buildable: False
type: exitcode-stdio-1.0
default-language: Haskell2010
ghc-options: -Wall -Wno-name-shadowing -threaded
main-is: Main.hs
hs-source-dirs: bench
build-tool-depends:
ghcide-bench:ghcide-bench,
hp2pretty:hp2pretty,
implicit-hie:gen-hie
default-extensions:
BangPatterns
DeriveFunctor
DeriveGeneric
FlexibleContexts
GeneralizedNewtypeDeriving
LambdaCase
NamedFieldPuns
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns
build-depends:
aeson,
base == 4.*,
containers,
data-default,
directory,
extra,
filepath,
ghcide-bench,
haskell-language-server,
hls-plugin-api,
lens,
lens-aeson,
optparse-applicative,
shake,
shake-bench == 0.2.*,
text,
yaml