Skip to content

Commit 26a6ca6

Browse files
drsoochwz1000
authored andcommitted
Special handling of 9.2
1 parent 608cfd9 commit 26a6ca6

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@ getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of
7878
HsInt _ val -> fromIntegralLit patSpan val
7979
HsRat _ val _ -> fromFractionalLit patSpan val
8080
_ -> Nothing
81+
#if __GLASGOW_HASKELL__ == 902
82+
NPat _ (L (RealSrcSpan sSpan _) overLit) _ _ -> fromOverLit overLit sSpan
83+
NPlusKPat _ _ (L (RealSrcSpan sSpan _) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
84+
#else
8185
NPat _ (L (locA -> (RealSrcSpan sSpan _)) overLit) _ _ -> fromOverLit overLit sSpan
8286
NPlusKPat _ _ (L (locA -> (RealSrcSpan sSpan _)) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
87+
#endif
8388
_ -> Nothing
8489
getPattern _ = Nothing
8590

0 commit comments

Comments
 (0)