Skip to content

Commit d02380d

Browse files
committed
Rename GHC_LIB cpp option
1 parent 6db91f3 commit d02380d

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)
@@ -181,7 +181,7 @@ getIdeas nfp = do
181181
fmap applyHints' (moduleEx flags)
182182

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

0 commit comments

Comments
 (0)