@@ -26,17 +26,9 @@ flag pedantic
26
26
manual : True
27
27
28
28
flag ghc-lib
29
- default : False
30
- manual : True
31
- description :
32
- Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported
33
-
34
- flag hlint34
35
- default : True
36
- manual : False
37
- description :
38
- Hlint-3.4 doesn't support versions ghc-lib < 9.0.1 nor ghc <= 8.6 , so we can use hlint-3.2 for backwards compat
39
- This flag can be removed when all dependencies support ghc-lib-9.0.* and we drop support for ghc-8.6
29
+ default : True
30
+ manual : True
31
+ description : Use ghc-lib types (requires hlint to be built with ghc-lib)
40
32
41
33
library
42
34
exposed-modules : Ide.Plugin.Hlint
@@ -56,7 +48,7 @@ library
56
48
, ghc-exactprint >= 0.6.3.4
57
49
, ghcide ^>= 1.7
58
50
, hashable
59
- , hlint
51
+ , hlint < 3.5
60
52
, hls-plugin-api ^>= 1.4
61
53
, hslogger
62
54
, lens
@@ -69,41 +61,11 @@ library
69
61
, transformers
70
62
, unordered-containers
71
63
, apply-refact >= 0.9.0.0
72
- -- can be removed if https://github.com/ndmitchell/hlint/pull/1325#issue-1077062712 is merged
73
- -- and https://github.com/haskell/haskell-language-server/pull/2464#issue-1077133441 is updated
74
- -- accordingly
64
+ , ghc-lib
65
+ , ghc-lib-parser
75
66
, ghc-lib-parser-ex
76
67
77
- if (flag(hlint34))
78
- -- This mirrors the logic in hlint.cabal for hlint-3.3
79
- -- https://github.com/ndmitchell/hlint/blob/d3576de4529d8df6cca5a345f5b7e04474ff7bff/hlint.cabal#L79-L88
80
- -- so we can make sure that we do the same thing as hlint
81
- build-depends : hlint ^>= 3.4
82
-
83
- if (!flag(ghc-lib) && impl(ghc >= 9.0.1 ) && impl(ghc < 9.1.0 ))
84
- build-depends : ghc == 9.0. *
85
- else
86
- build-depends :
87
- , ghc-lib ^>= 9.2
88
- , ghc-lib-parser-ex ^>= 9.2
89
- , ghc-lib-parser ^>= 9.2
90
-
91
- cpp-options : -DHLINT_ON_GHC_LIB
92
-
93
- else
94
- -- This mirrors the logic in hlint.cabal for hlint-3.2
95
- -- https://github.com/ndmitchell/hlint/blob/c7354e473c7d09213c8adc3dc94bf50a6eb4a42d/hlint.cabal#L79-L88
96
- build-depends : hlint ^>= 3.2
97
- if (!flag(ghc-lib) && impl(ghc >= 8.10.1 ) && impl(ghc < 8.11.0 ))
98
- build-depends : ghc >= 8.10 && < 9.0
99
- else
100
- build-depends :
101
- , ghc
102
- , ghc-lib ^>= 8.10.7.20210828
103
- , ghc-lib-parser-ex ^>= 8.10
104
-
105
- cpp-options : -DHLINT_ON_GHC_LIB
106
-
68
+ cpp-options : -DHLINT_ON_GHC_LIB
107
69
ghc-options :
108
70
-Wall -Wredundant-constraints -Wno-name-shadowing
109
71
-Wno-unticked-promoted-constructors
0 commit comments