Skip to content

Commit 89a758d

Browse files
committed
fix extractDoesNotExportModuleName for GHC 9.4 by adjusting regex match
1 parent 85c8f20 commit 89a758d

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,8 +1890,13 @@ extractQualifiedModuleName x
18901890
extractDoesNotExportModuleName :: T.Text -> Maybe T.Text
18911891
extractDoesNotExportModuleName x
18921892
| Just [m] <-
1893+
#if MIN_VERSION_ghc(9,4,0)
1894+
matchRegexUnifySpaces x "the module ‘([^’]*)’ does not export"
1895+
<|> matchRegexUnifySpaces x "nor ‘([^’]*)’ export"
1896+
#else
18931897
matchRegexUnifySpaces x "Module ‘([^’]*)’ does not export"
18941898
<|> matchRegexUnifySpaces x "nor ‘([^’]*)’ exports"
1899+
#endif
18951900
= Just m
18961901
| otherwise
18971902
= Nothing

0 commit comments

Comments
 (0)