Skip to content

Commit 512fa5c

Browse files
committed
More CPP
1 parent a478a75 commit 512fa5c

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

ghcide/src/Development/IDE/GHC/Compat.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,7 @@ generatedNodeInfo :: HieAST a -> Maybe (NodeInfo a)
429429
generatedNodeInfo = Map.lookup GeneratedInfo . getSourcedNodeInfo . sourcedNodeInfo
430430

431431
data GhcVersion
432-
= GHC92
433-
| GHC94
432+
= GHC94
434433
| GHC96
435434
| GHC98
436435
| GHC910
@@ -448,8 +447,6 @@ ghcVersion = GHC98
448447
ghcVersion = GHC96
449448
#elif MIN_VERSION_GLASGOW_HASKELL(9,4,0,0)
450449
ghcVersion = GHC94
451-
#elif MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
452-
ghcVersion = GHC92
453450
#endif
454451

455452
simpleNodeInfoCompat :: FastStringCompat -> FastStringCompat -> NodeInfo a

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,8 @@ getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of
6868
HsInt _ val -> fromIntegralLit patSpan val
6969
HsRat _ val _ -> fromFractionalLit patSpan val
7070
_ -> Nothing
71-
#if __GLASGOW_HASKELL__ == 902
72-
NPat _ (L (RealSrcSpan sSpan _) overLit) _ _ -> fromOverLit overLit sSpan
73-
NPlusKPat _ _ (L (RealSrcSpan sSpan _) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
74-
#else
7571
NPat _ (L (locA -> (RealSrcSpan sSpan _)) overLit) _ _ -> fromOverLit overLit sSpan
7672
NPlusKPat _ _ (L (locA -> (RealSrcSpan sSpan _)) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
77-
#endif
7873
_ -> Nothing
7974
getPattern _ = Nothing
8075

plugins/hls-overloaded-record-dot-plugin/src/Ide/Plugin/OverloadedRecordDot.hs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ getRecSels (unLoc -> XExpr (ExpandedThingRn a _)) = (collectRecordSelectors a, T
289289
#else
290290
getRecSels (unLoc -> XExpr (HsExpanded a _)) = (collectRecordSelectors a, True)
291291
#endif
292-
#if __GLASGOW_HASKELL__ >= 903
293292
-- applied record selection: "selector record" or "selector (record)" or
294293
-- "selector selector2.record2"
295294
getRecSels e@(unLoc -> HsApp _ se@(unLoc -> HsRecSel _ _) re) =
@@ -301,15 +300,6 @@ getRecSels e@(unLoc -> OpApp _ se@(unLoc -> HsRecSel _ _)
301300
(unLoc -> HsVar _ (unLoc -> d)) re) | d == dollarName =
302301
( [ RecordSelectorExpr (realSrcSpanToRange realSpan') se re
303302
| RealSrcSpan realSpan' _ <- [ getLoc e ] ], False )
304-
#else
305-
getRecSels e@(unLoc -> HsApp _ se@(unLoc -> HsRecFld _ _) re) =
306-
( [ RecordSelectorExpr (realSrcSpanToRange realSpan') se re
307-
| RealSrcSpan realSpan' _ <- [ getLoc e ] ], False )
308-
getRecSels e@(unLoc -> OpApp _ se@(unLoc -> HsRecFld _ _)
309-
(unLoc -> HsVar _ (unLoc -> d)) re) | d == dollarName =
310-
( [ RecordSelectorExpr (realSrcSpanToRange realSpan') se re
311-
| RealSrcSpan realSpan' _ <- [ getLoc e ] ], False )
312-
#endif
313303
getRecSels _ = ([], False)
314304

315305
collectRecSelResult :: MonadIO m => IdeState -> NormalizedFilePath

0 commit comments

Comments
 (0)