Skip to content

Commit 6d3635c

Browse files
committed
alternate-number-format: relax __GLASGOW_HASKELL__ bounds
1 parent bc005c3 commit 6d3635c

File tree

1 file changed

+3
-3
lines changed
  • plugins/hls-alternate-number-format-plugin/src/Ide/Plugin

1 file changed

+3
-3
lines changed

plugins/hls-alternate-number-format-plugin/src/Ide/Plugin/Literals.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module Ide.Plugin.Literals (
1414
import Data.Maybe (maybeToList)
1515
import Data.Text (Text)
1616
import qualified Data.Text as T
17-
#if __GLASGOW_HASKELL__ == 908
17+
#if __GLASGOW_HASKELL__ >= 908
1818
import qualified Data.Text.Encoding as T
1919
#endif
2020
import Development.IDE.GHC.Compat hiding (getSrcSpan)
@@ -72,7 +72,7 @@ getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of
7272
HsInt _ val -> fromIntegralLit patSpan val
7373
HsRat _ val _ -> fromFractionalLit patSpan val
7474
_ -> Nothing
75-
#if __GLASGOW_HASKELL__ == 902
75+
#if __GLASGOW_HASKELL__ >= 902
7676
NPat _ (L (RealSrcSpan sSpan _) overLit) _ _ -> fromOverLit overLit sSpan
7777
NPlusKPat _ _ (L (RealSrcSpan sSpan _) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
7878
#else
@@ -103,7 +103,7 @@ fromFractionalLit s fl@FL{fl_text} = fmap (\txt' -> FracLiteral (LiteralSrcSpan
103103

104104
fromSourceText :: SourceText -> Maybe Text
105105
fromSourceText = \case
106-
#if __GLASGOW_HASKELL__ == 908
106+
#if __GLASGOW_HASKELL__ >= 908
107107
SourceText s -> Just $ T.decodeUtf8 $ bytesFS s
108108
#else
109109
SourceText s -> Just $ T.pack s

0 commit comments

Comments
 (0)