summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser.y
diff options
context:
space:
mode:
authorJoshua Price <2855417+ElderEphemera@users.noreply.github.com>2020-05-22 23:57:56 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-27 00:15:17 -0400
commitd6203f24cf421749616a247c047a9b44192f963a (patch)
treed6b6f9a114b79367d5943e3963fdd26c390fa3a4 /compiler/GHC/Parser.y
parent04750304deae2128a8350e28224e1f62ae949820 (diff)
downloadhaskell-d6203f24cf421749616a247c047a9b44192f963a.tar.gz
Make `identifier` parse unparenthesized `->` (#18060)
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r--compiler/GHC/Parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 00ea6fbda8..6dde13f7a9 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -644,6 +644,8 @@ identifier :: { Located RdrName }
| qconop { $1 }
| '(' '->' ')' {% ams (sLL $1 $> $ getRdrName funTyCon)
[mop $1,mu AnnRarrow $2,mcp $3] }
+ | '->' {% ams (sLL $1 $> $ getRdrName funTyCon)
+ [mu AnnRarrow $1] }
-----------------------------------------------------------------------------
-- Backpack stuff