@@ -107,9 +107,9 @@ import Language.LSP.Protocol.Types (CodeAction (..),
107
107
WorkspaceEdit (WorkspaceEdit ),
108
108
type (|? ) (InL , InR ))
109
109
110
-
110
+ #if __GLASGOW_HASKELL__ < 910
111
111
import Development.IDE.GHC.Compat (HsExpansion (HsExpanded ))
112
-
112
+ #endif
113
113
114
114
data Log
115
115
= LogShake Shake. Log
@@ -271,11 +271,11 @@ collectNamesRule = defineNoDiagnostics mempty $ \CollectNames nfp -> runMaybeT $
271
271
-- | Collects all 'Name's of a given source file, to be used
272
272
-- in the variable usage analysis.
273
273
getNames :: TcModuleResult -> UniqFM Name [Name ]
274
-
274
+ #if __GLASGOW_HASKELL__ < 910
275
275
getNames (tmrRenamed -> (group,_,_,_)) = collectNames group
276
-
277
-
278
-
276
+ #else
277
+ getNames (tmrRenamed -> (group,_,_,_,_)) = collectNames group
278
+ #endif
279
279
280
280
data CollectRecords = CollectRecords
281
281
deriving (Eq , Show , Generic )
@@ -493,11 +493,11 @@ getRecCons :: LHsExpr GhcTc -> ([RecordInfo], Bool)
493
493
-- because there is a possibility that there were be more than one result per
494
494
-- branch
495
495
496
-
497
-
498
-
496
+ #if __GLASGOW_HASKELL__ >= 910
497
+ getRecCons (unLoc -> XExpr ( ExpandedThingTc a _)) = (collectRecords a, False )
498
+ #else
499
499
getRecCons (unLoc -> XExpr (ExpansionExpr (HsExpanded _ a))) = (collectRecords a, True )
500
-
500
+ #endif
501
501
getRecCons e@ (unLoc -> RecordCon _ _ flds)
502
502
| isJust (rec_dotdot flds) = (mkRecInfo e, False )
503
503
where
0 commit comments