summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-06-19 23:16:39 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-20 11:17:26 -0400
commitf4dce6cfd71d2a1dc2e281f19cae85e62aaf6b8e (patch)
tree4f6910e15da50791aea20d607c3fc50cfc1fd3d9 /compiler/parser
parent942e6c9ecaf12d2834ca5352c6f51e8419efc57c (diff)
downloadhaskell-f4dce6cfd71d2a1dc2e281f19cae85e62aaf6b8e.tar.gz
Allow :info for (~) in GHCi
`(~)` is not an identifier according to GHC's parser, which is why GHCi's `:info` command wouldn't work on it. To rectify this, we apply the same fix that was put in place for `(->)`: add `(~)` to GHC's `identifier` parser production. Test Plan: make test TEST=T10059 Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, mpickering, carter GHC Trac Issues: #10059 Differential Revision: https://phabricator.haskell.org/D4877
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Parser.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 066ee421fb..0e93dd043b 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -626,7 +626,9 @@ identifier :: { Located RdrName }
| qvarop { $1 }
| qconop { $1 }
| '(' '->' ')' {% ams (sLL $1 $> $ getRdrName funTyCon)
- [mj AnnOpenP $1,mu AnnRarrow $2,mj AnnCloseP $3] }
+ [mop $1,mu AnnRarrow $2,mcp $3] }
+ | '(' '~' ')' {% ams (sLL $1 $> $ eqTyCon_RDR)
+ [mop $1,mj AnnTilde $2,mcp $3] }
-----------------------------------------------------------------------------
-- Backpack stuff