@@ -40,8 +40,20 @@ common common-deps
40
40
, filepath
41
41
, text
42
42
43
+ -- Default warnings in HLS
44
+ common warnings
45
+ ghc-options : -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors
46
+
47
+ -- Allow compiling in pedantic mode
48
+ common pedantic
49
+ if flag(pedantic)
50
+ ghc-options : -Werror
51
+
43
52
library
44
53
import : common-deps
54
+ -- configuration
55
+ , warnings
56
+ , pedantic
45
57
exposed-modules :
46
58
Ide.Arguments
47
59
Ide.Main
@@ -74,11 +86,6 @@ library
74
86
, unordered-containers
75
87
, aeson-pretty
76
88
77
- ghc-options : -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors
78
-
79
- if flag(pedantic)
80
- ghc-options : -Werror
81
-
82
89
default-language : Haskell2010
83
90
default-extensions : DataKinds, TypeOperators
84
91
@@ -302,6 +309,9 @@ common brittany
302
309
303
310
executable haskell-language-server
304
311
import : common-deps
312
+ -- configuration
313
+ , warnings
314
+ , pedantic
305
315
-- plugins
306
316
, example-plugins
307
317
, callHierarchy
@@ -330,15 +340,12 @@ executable haskell-language-server
330
340
other-modules : Plugins
331
341
332
342
ghc-options :
333
- -threaded -Wall -Wno-name-shadowing -Wredundant-constraints
343
+ -threaded
334
344
-- allow user RTS overrides
335
345
-rtsopts
336
346
-- disable idle GC
337
347
-- increase nursery size
338
348
"-with-rtsopts=-I0 -A128M"
339
- -Wno-unticked-promoted-constructors
340
- if flag(pedantic)
341
- ghc-options : -Werror
342
349
343
350
build-depends :
344
351
, aeson
@@ -378,19 +385,19 @@ executable haskell-language-server
378
385
379
386
executable haskell-language-server-wrapper
380
387
import : common-deps
388
+ , warnings
389
+ , pedantic
381
390
main-is : Wrapper.hs
382
391
hs-source-dirs : exe
383
392
other-modules : Paths_haskell_language_server
384
393
autogen-modules : Paths_haskell_language_server
385
394
ghc-options :
386
- -threaded -Wall -Wno-name-shadowing -Wredundant-constraints
395
+ -threaded
387
396
-- allow user RTS overrides
388
397
-rtsopts
389
398
-- disable idle GC
390
399
-- increase nursery size
391
400
"-with-rtsopts=-I0 -A128M"
392
- if flag(pedantic)
393
- ghc-options : -Werror
394
401
395
402
build-depends :
396
403
, data-default
@@ -409,6 +416,8 @@ executable haskell-language-server-wrapper
409
416
410
417
test-suite func-test
411
418
import : common-deps
419
+ , warnings
420
+ , pedantic
412
421
type : exitcode-stdio-1.0
413
422
default-language : Haskell2010
414
423
build-tool-depends :
@@ -454,10 +463,7 @@ test-suite func-test
454
463
455
464
default-extensions : OverloadedStrings
456
465
ghc-options :
457
- -Wall -Wno-name-shadowing -threaded -rtsopts -with-rtsopts=-N -Wno-unticked-promoted-constructors
458
-
459
- if flag(pedantic)
460
- ghc-options : -Werror -Wredundant-constraints
466
+ -threaded -rtsopts -with-rtsopts=-N
461
467
462
468
-- Duplicating inclusion plugin conditions until tests are moved to their own packages
463
469
if flag(eval)
@@ -471,19 +477,18 @@ test-suite func-test
471
477
cpp-options : -Dormolu
472
478
473
479
test-suite wrapper-test
480
+ import : common-deps
481
+ , warnings
482
+ , pedantic
474
483
type : exitcode-stdio-1.0
475
484
build-tool-depends :
476
485
haskell-language-server :haskell-language-server-wrapper -any,
477
486
haskell-language-server :haskell-language-server -any
478
487
479
488
default-language : Haskell2010
480
489
build-depends :
481
- , base
482
- , directory
483
- , process
490
+ process
484
491
, hls-test-utils
485
- , extra
486
492
487
493
hs-source-dirs : test/wrapper
488
494
main-is : Main.hs
489
- ghc-options : -Wall
0 commit comments