Skip to content

Commit

Permalink
Reintroduce ghc-lib flag for hlint plugin
Browse files Browse the repository at this point in the history
The ghc-lib flag was removed in haskell#3015, but it's still useful to
be able to compile hls-hlint-plugin using the GHC API if you've done so
for hlint and ghc-lib-parser-ex, rather than using ghc-lib-parser as it
simplifies the build and dependencies.
  • Loading branch information
RaoulHC committed Mar 7, 2024
1 parent 6207dbc commit f605535
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,13 @@ test-suite hls-retrie-plugin-tests
-- hlint plugin
-----------------------------

flag ghc-lib
description:
Use ghc-lib-parser rather than the ghc library (requires hlint and
ghc-lib-parser-ex to also be built with it)
default: True
manual: True

flag hlint
description: Enable hlint plugin
default: True
Expand Down Expand Up @@ -628,10 +635,18 @@ library hls-hlint-plugin
, text
, transformers
, unordered-containers
, ghc-lib-parser
, ghc-lib-parser-ex
, apply-refact

if flag(ghc-lib)
cpp-options: -DGHC_LIB
build-depends:
ghc-lib-parser
else
build-depends:
ghc
, ghc-boot

default-extensions:
DataKinds

Expand Down

0 comments on commit f605535

Please sign in to comment.