[Git][ghc/ghc][wip/or-pats] Fix test errors
David (@knothed)
gitlab at gitlab.haskell.org
Thu Feb 9 14:31:36 UTC 2023
David pushed to branch wip/or-pats at Glasgow Haskell Compiler / GHC
Commits:
c5248a75 by David Knothe at 2023-02-09T15:31:31+01:00
Fix test errors
- - - - -
2 changed files:
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
Changes:
=====================================
compiler/GHC/Parser/Lexer.x
=====================================
@@ -1000,7 +1000,7 @@ reservedWordsFM = listToUFM $
( "mdo", ITmdo Nothing, xbit RecursiveDoBit),
-- See Note [Lexing type pseudo-keywords]
( "family", ITfamily, 0 ),
- ( "one", ITone, 0 ),
+ ( "one", ITone, xbit OrPatternsBit),
( "role", ITrole, 0 ),
( "pattern", ITpattern, xbit PatternSynonymsBit),
( "static", ITstatic, xbit StaticPointersBit ),
=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -1177,6 +1177,9 @@ checkFPat loc (L l e@(PatBuilderVar (L ln c))) tyargs args
| (not (null args) && patIsRec c) = do
ctx <- askParseContext
patFail (locA l) . PsErrInPat e $ PEIP_RecPattern args YesPatIsRecursive ctx
+ | not (null args) = do
+ details <- fromParseContext <$> askParseContext
+ patFail (locA l) (PsErrInPat e details)
| otherwise = return $ L l (VarPat noExtField (L ln c))
checkFPat loc (L _ (PatBuilderAppType f at t)) tyargs args =
checkFPat loc f (HsConPatTyArg at t : tyargs) args
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c5248a7556f9bde5a639ffee5fa5242c0fa21f60
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c5248a7556f9bde5a639ffee5fa5242c0fa21f60
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/20230209/e63c8619/attachment-0001.html>
More information about the ghc-commits
mailing list