forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhls-hlint-plugin.cabal
133 lines (120 loc) · 3.63 KB
/
hls-hlint-plugin.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
cabal-version: 2.4
name: hls-hlint-plugin
version: 1.0.2.1
synopsis: Hlint integration plugin with Haskell Language Server
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
license: Apache-2.0
license-file: LICENSE
author: The Haskell IDE Team
maintainer: [email protected]
copyright: The Haskell IDE Team
category: Development
build-type: Simple
extra-source-files:
LICENSE
test/testdata/**/*.yaml
-- this one is not matched by the previous glob
test/testdata/ignore/.hlint.yaml
test/testdata/**/*.hs
test/testdata/**/*.h
flag pedantic
description: Enable -Werror
default: False
manual: True
flag ghc-lib
default: False
manual: True
description:
Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported
flag hlint33
default: True
manual: False
description:
Hlint-3.3 doesn't support versions ghc-lib < 9.0.1 nor ghc <= 8.6, so we can use hlint-3.2 for backwards compat
This flag can be removed when all dependencies support ghc-lib-9.0.1 and we drop support for ghc-8.6
library
exposed-modules: Ide.Plugin.Hlint
hs-source-dirs: src
build-depends:
, aeson
, apply-refact >=0.9.3.0
, base >=4.12 && <5
, binary
, bytestring
, containers
, data-default
, deepseq
, Diff ^>=0.4.0
, directory
, extra
, filepath
, ghc-exactprint >=0.6.3.4
, ghcide ^>=1.5.0
, hashable
, hlint
, hls-plugin-api >=1.1 && <1.3
, hslogger
, lens
, lsp
, regex-tdfa
, stm
, temporary
, text
, transformers
, unordered-containers
-- can be removed if https://github.com/ndmitchell/hlint/pull/1325#issue-1077062712 is merged
-- and https://github.com/haskell/haskell-language-server/pull/2464#issue-1077133441 is updated
-- accordingly
, ghc-lib-parser-ex
if (flag(hlint33))
-- This mirrors the logic in hlint.cabal for hlint-3.3
-- https://github.com/ndmitchell/hlint/blob/d3576de4529d8df6cca5a345f5b7e04474ff7bff/hlint.cabal#L79-L88
-- so we can make sure that we do the same thing as hlint
build-depends: hlint ^>=3.3
if (!flag(ghc-lib) && impl(ghc >=9.0.1) && impl(ghc <9.1.0))
build-depends: ghc ==9.0.*
else
build-depends:
, ghc
, ghc-lib ^>=9.0
, ghc-lib-parser-ex ^>=9.0
cpp-options: -DHLINT_ON_GHC_LIB
else
-- This mirrors the logic in hlint.cabal for hlint-3.2
-- https://github.com/ndmitchell/hlint/blob/c7354e473c7d09213c8adc3dc94bf50a6eb4a42d/hlint.cabal#L79-L88
build-depends: hlint ^>=3.2
if (!flag(ghc-lib) && impl(ghc >=8.10.1) && impl(ghc < 8.11.0))
build-depends: ghc >=8.10 && <9.0
else
build-depends:
, ghc
, ghc-lib ^>=8.10.7.20210828
, ghc-lib-parser-ex ^>=8.10
cpp-options: -DHLINT_ON_GHC_LIB
ghc-options:
-Wall -Wredundant-constraints -Wno-name-shadowing
-Wno-unticked-promoted-constructors
if flag(pedantic)
ghc-options: -Werror
default-language: Haskell2010
default-extensions:
DataKinds
TypeOperators
test-suite tests
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base
, containers
, filepath
, hls-hlint-plugin
, hls-plugin-api
, hls-test-utils >=1.0 && <1.2
, lens
, lsp-types
, text