Skip to content

Commit bd8e6a0

Browse files
committed
fix some warnings in hlint plugin
1 parent 0a0c5ed commit bd8e6a0

File tree

1 file changed

+8
-0
lines changed
  • plugins/hls-hlint-plugin/src/Ide/Plugin

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020

2121
{-# OPTIONS_GHC -Wno-orphans #-}
2222

23+
-- On 9.4 we get a new redundant constraint warning, but deleting the
24+
-- constraint breaks the build on earlier versions. Rather than apply
25+
-- lots of CPP, we just disable the warning until later.
26+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
27+
2328
#ifdef HLINT_ON_GHC_LIB
2429
#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc_lib_parser(x,y,z)
2530
#else
@@ -134,8 +139,11 @@ import Development.IDE.Spans.Pragmas (LineSplitTe
134139
lineSplitTextEdits,
135140
nextPragmaLine)
136141
import GHC.Generics (Generic)
142+
#if MIN_VERSION_apply_refact(0,12,0)
143+
#else
137144
import System.Environment (setEnv,
138145
unsetEnv)
146+
#endif
139147
import Text.Regex.TDFA.Text ()
140148
-- ---------------------------------------------------------------------
141149

0 commit comments

Comments
 (0)