Skip to content

Commit 9c74869

Browse files
committed
Rename GHC_LIB cpp option
1 parent 1dc9949 commit 9c74869

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/hls-hlint-plugin/hls-hlint-plugin.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ library
6262
, ghc-lib ^>= 8.10.2.20200916
6363
, ghc-lib-parser-ex ^>= 8.10
6464

65-
cpp-options: -DGHC_LIB
65+
cpp-options: -DHLINT_ON_GHC_LIB
6666

6767
ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing
6868

plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import Development.IDE
3737
import Development.IDE.Core.Rules (defineNoFile)
3838
import Development.IDE.Core.Shake (getDiagnostics)
3939

40-
#ifdef GHC_LIB
40+
#ifdef HLINT_ON_GHC_LIB
4141
import Data.List (nub)
4242
import "ghc-lib" GHC hiding (DynFlags(..))
4343
import "ghc-lib-parser" GHC.LanguageExtensions (Extension)
@@ -180,7 +180,7 @@ getIdeas nfp = do
180180
fmap applyHints' (moduleEx flags)
181181

182182
where moduleEx :: ParseFlags -> Action (Maybe (Either ParseError ModuleEx))
183-
#ifndef GHC_LIB
183+
#ifndef HLINT_ON_GHC_LIB
184184
moduleEx _flags = do
185185
mbpm <- getParsedModule nfp
186186
return $ createModule <$> mbpm
@@ -367,7 +367,7 @@ applyHint ide nfp mhint =
367367
-- If we provide "applyRefactorings" with "Just (1,13)" then
368368
-- the "Redundant bracket" hint will never be executed
369369
-- because SrcSpan (1,20,??,??) doesn't contain position (1,13).
370-
#ifdef GHC_LIB
370+
#ifdef HLINT_ON_GHC_LIB
371371
let writeFileUTF8NoNewLineTranslation file txt =
372372
withFile file WriteMode $ \h -> do
373373
hSetEncoding h utf8

0 commit comments

Comments
 (0)