Skip to content

Commit f1eb36a

Browse files
committed
fix: add support for GHC 9.4 for import indirect type field
This correct previous commit by handling ghc 9.4 parethensis instead of "tick".
1 parent f1b6340 commit f1eb36a

File tree

1 file changed

+2
-2
lines changed
  • plugins/hls-refactor-plugin/src/Development/IDE/Plugin

1 file changed

+2
-2
lines changed

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1864,9 +1864,9 @@ extractNotInScopeName x
18641864
-- hint changes in the future
18651865
-- - Next regex will account for polymorphic types, which appears as `HasField
18661866
-- "foo" (Bar Int)...`, e.g. see the parenthesis
1867-
| Just [_module, name] <- matchRegexUnifySpaces x "No instance for .*HasField \"[^\"]+\" ([^ (.]+\\.)*([^ (.]+).*"
1867+
| Just [_module, name] <- matchRegexUnifySpaces x "No instance for [‘(].*HasField \"[^\"]+\" ([^ (.]+\\.)*([^ (.]+).*[’)]"
18681868
= Just $ NotInScopeThing name
1869-
| Just [_module, name] <- matchRegexUnifySpaces x "No instance for .*HasField \"[^\"]+\" \\(([^ .]+\\.)*([^ .]+)[^)]*\\).*"
1869+
| Just [_module, name] <- matchRegexUnifySpaces x "No instance for [‘(].*HasField \"[^\"]+\" \\(([^ .]+\\.)*([^ .]+)[^)]*\\).*[’)]"
18701870
= Just $ NotInScopeThing name
18711871
| Just [name] <- matchRegexUnifySpaces x "ot in scope: \\(([^‘ ]+)\\)"
18721872
= Just $ NotInScopeThing name

0 commit comments

Comments
 (0)