[Git][ghc/ghc][master] Don't name a binding pattern
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Sep 10 04:41:37 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00
Don't name a binding pattern
It's a keyword when PatternSynonyms are set.
- - - - -
1 changed file:
- compiler/GHC/Core/Opt/CallerCC/Types.hs
Changes:
=====================================
compiler/GHC/Core/Opt/CallerCC/Types.hs
=====================================
@@ -61,14 +61,14 @@ occNameMatches pat = go pat . occNameString
type Parser = P.ReadP
parseNamePattern :: Parser NamePattern
-parseNamePattern = pattern
+parseNamePattern = namePattern
where
- pattern = star P.<++ wildcard P.<++ char P.<++ end
- star = PChar '*' <$ P.string "\\*" <*> pattern
+ namePattern = star P.<++ wildcard P.<++ char P.<++ end
+ star = PChar '*' <$ P.string "\\*" <*> namePattern
wildcard = do
void $ P.char '*'
- PWildcard <$> pattern
- char = PChar <$> P.get <*> pattern
+ PWildcard <$> namePattern
+ char = PChar <$> P.get <*> namePattern
end = PEnd <$ P.eof
data CallerCcFilter
@@ -110,4 +110,4 @@ parseCallerCcFilter' =
c <- P.satisfy isUpper
cs <- P.munch1 (\c -> isUpper c || isLower c || isDigit c || c == '_')
rest <- optional $ P.char '.' >> fmap ('.':) moduleName
- return $ c : (cs ++ fromMaybe "" rest)
\ No newline at end of file
+ return $ c : (cs ++ fromMaybe "" rest)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e28cd0210ba5f380cf4da96c581043c19e629b44
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e28cd0210ba5f380cf4da96c581043c19e629b44
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240910/f5360f2b/attachment-0001.html>
More information about the ghc-commits
mailing list