Skip to content

Commit b69dae9

Browse files
alanzjneira
authored andcommitted
WIP on integrating hlint using DAML approach
But getting a mismatch on ghc-lib vs GHC types for the call to hlint. Closes #32
1 parent b6c1551 commit b69dae9

File tree

3 files changed

+583
-1
lines changed

3 files changed

+583
-1
lines changed

Diff for: exe/Main.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import Ide.Plugin.GhcIde as GhcIde
7070
import Ide.Plugin.Floskell as Floskell
7171
import Ide.Plugin.Fourmolu as Fourmolu
7272
import Ide.Plugin.ImportLens as ImportLens
73+
import Ide.Plugin.Hlint as Hlint
7374
import Ide.Plugin.Ormolu as Ormolu
7475
import Ide.Plugin.StylishHaskell as StylishHaskell
7576
import Ide.Plugin.Retrie as Retrie
@@ -112,10 +113,11 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
112113
, StylishHaskell.descriptor "stylish-haskell"
113114
, Retrie.descriptor "retrie"
114115
#if AGPL
115-
, Brittany.descriptor "brittany"
116+
, Brittany.descriptor "brittany"
116117
#endif
117118
, Eval.descriptor "eval"
118119
, ImportLens.descriptor "importLens"
120+
, Hlint.descriptor "hlint"
119121
]
120122
examplePlugins =
121123
[Example.descriptor "eg"

Diff for: haskell-language-server.cabal

+48
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,53 @@ library
118118

119119
default-language: Haskell2010
120120

121+
flag ghc-lib
122+
default: False
123+
manual: True
124+
description: Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported
125+
126+
library hls-ghc-lib
127+
exposed-modules:
128+
Ide.Plugin.Hlint
129+
hs-source-dirs:
130+
src
131+
build-depends:
132+
base
133+
, aeson
134+
, binary
135+
, bytestring
136+
, containers
137+
, data-default
138+
, deepseq
139+
, directory
140+
, extra
141+
, filepath
142+
, ghcide
143+
, hashable
144+
, haskell-lsp
145+
, haskell-src-exts
146+
, hlint >= 3.0
147+
, regex-tdfa
148+
, shake
149+
, text
150+
, transformers
151+
, unordered-containers
152+
if !flag(ghc-lib) && impl(ghc >= 8.10.1) && impl(ghc < 8.11.0)
153+
build-depends:
154+
ghc == 8.10.*
155+
else
156+
build-depends:
157+
ghc-lib == 8.10.*
158+
159+
ghc-options:
160+
-Wall
161+
-Wredundant-constraints
162+
-Wno-name-shadowing
163+
if flag(pedantic)
164+
ghc-options: -Werror
165+
166+
default-language: Haskell2010
167+
121168
executable haskell-language-server
122169
import: agpl
123170
main-is: Main.hs
@@ -159,6 +206,7 @@ executable haskell-language-server
159206
, haskell-lsp
160207
, hie-bios
161208
, haskell-language-server
209+
, hls-ghc-lib
162210
, hslogger
163211
, optparse-applicative
164212
, safe-exceptions

0 commit comments

Comments
 (0)