diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-11-24 10:52:56 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-26 16:02:23 -0500 |
commit | 02372be119bd1a4e7099d2c7d5bb3de096e99409 (patch) | |
tree | 6fe26c6bb54b56cd576f5dd43f3684ddefad0b7d /compiler/GHC/Parser.y | |
parent | 7e18b3041321b19876e74b88ffed3b44e4665c23 (diff) | |
download | haskell-02372be119bd1a4e7099d2c7d5bb3de096e99409.tar.gz |
Allow keywords which can be used as variables to be used with OverloadedDotSyntax
There are quite a few keywords which are allowed to be used as
variables. Such as "as", "dependency" etc. These weren't accepted by
OverloadedDotSyntax.
The fix is pretty simple, use the varid production rather than raw
VARID.
Fixes #20723
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r-- | compiler/GHC/Parser.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y index 3575ee8eee..d499341c36 100644 --- a/compiler/GHC/Parser.y +++ b/compiler/GHC/Parser.y @@ -3720,7 +3720,7 @@ qvar :: { LocatedN RdrName } -- *after* we see the close paren. field :: { Located FastString } - : VARID { sL1 $1 $! getVARID $1 } + : varid { reLocN $ fmap (occNameFS . rdrNameOcc) $1 } qvarid :: { LocatedN RdrName } : varid { $1 } |