File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ generateLens pId uri minImports (L src imp)
140
140
| ImportDecl {ideclHiding = Just (False ,_)} <- imp
141
141
= return Nothing
142
142
-- Qualified case
143
- | ImportDecl {ideclQualified = True } <- imp
143
+ | isQualifiedImport imp
144
144
= return Nothing
145
145
-- No explicit import list
146
146
| RealSrcSpan l <- src
@@ -171,3 +171,12 @@ generateLens pId uri minImports (L src imp)
171
171
-- | A helper to run ide actions
172
172
runIde :: IdeState -> Action a -> IO a
173
173
runIde state = runAction " importLens" state
174
+
175
+ isQualifiedImport :: ImportDecl -> Bool
176
+ #if MIN_GHC_API_VERSION(8,10,0)
177
+ isQualifiedImport ImportDecl {ideclQualified = GHC. NotQualified } = False
178
+ isQualifiedImport ImportDecl {ideclQualified = GHC. NotQualified } = True
179
+ #else
180
+ isQualifiedImport ImportDecl {ideclQualified} = ideclQualified
181
+ #endif
182
+
You can’t perform that action at this time.
0 commit comments