Skip to content

Commit d786549

Browse files
committed
recover accidentally deleted macros
1 parent ab3f84a commit d786549

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

plugins/hls-explicit-record-fields-plugin/src/Ide/Plugin/ExplicitFields.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ import Language.LSP.Protocol.Types (CodeAction (..),
107107
WorkspaceEdit (WorkspaceEdit),
108108
type (|?) (InL, InR))
109109

110-
110+
#if __GLASGOW_HASKELL__ < 910
111111
import Development.IDE.GHC.Compat (HsExpansion (HsExpanded))
112-
112+
#endif
113113

114114
data Log
115115
= LogShake Shake.Log
@@ -271,11 +271,11 @@ collectNamesRule = defineNoDiagnostics mempty $ \CollectNames nfp -> runMaybeT $
271271
-- | Collects all 'Name's of a given source file, to be used
272272
-- in the variable usage analysis.
273273
getNames :: TcModuleResult -> UniqFM Name [Name]
274-
274+
#if __GLASGOW_HASKELL__ < 910
275275
getNames (tmrRenamed -> (group,_,_,_)) = collectNames group
276-
277-
278-
276+
#else
277+
getNames (tmrRenamed -> (group,_,_,_,_)) = collectNames group
278+
#endif
279279

280280
data CollectRecords = CollectRecords
281281
deriving (Eq, Show, Generic)
@@ -493,11 +493,11 @@ getRecCons :: LHsExpr GhcTc -> ([RecordInfo], Bool)
493493
-- because there is a possibility that there were be more than one result per
494494
-- branch
495495

496-
497-
498-
496+
#if __GLASGOW_HASKELL__ >= 910
497+
getRecCons (unLoc -> XExpr (ExpandedThingTc a _)) = (collectRecords a, False)
498+
#else
499499
getRecCons (unLoc -> XExpr (ExpansionExpr (HsExpanded _ a))) = (collectRecords a, True)
500-
500+
#endif
501501
getRecCons e@(unLoc -> RecordCon _ _ flds)
502502
| isJust (rec_dotdot flds) = (mkRecInfo e, False)
503503
where

0 commit comments

Comments
 (0)