Skip to content

Commit 48af526

Browse files
committed
alternate-number-format: relax __GLASGOW_HASKELL__ bounds
1 parent aa524a0 commit 48af526

File tree

2 files changed

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

2 files changed

+4
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
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)
@@ -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

plugins/hls-explicit-fixity-plugin/test/Main.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ tests = testGroup "Explicit fixity"
3434
, hoverTest "(<|>)" (Position 21 8) "infixl 3 `<|>`"
3535
, hoverTest "fixity define" (Position 23 11) "infixr 7 `>>:`"
3636
, hoverTest "record" (Position 28 10) "infix 9 `>>::`"
37-
, hoverTest "wildcards" (Position 30 5) "infixr 7 `>>:` \n \ninfix 9 `>>::`"
37+
, hoverTest "wildcards1" (Position 30 5) "infixr 7 `>>:`"
38+
, hoverTest "wildcards2" (Position 30 5) "infix 9 `>>::`"
3839
, hoverTest "function" (Position 32 11) "infixl 1 `f`"
3940
, hoverTest "signature" (Position 35 2) "infixr 9 `>>>:`"
4041
, hoverTest "operator" (Position 36 2) "infixr 9 `>>>:`"

0 commit comments

Comments
 (0)