Skip to content
Snippets Groups Projects
Commit f4dce6cf authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari
Browse files

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
parent 942e6c9e
No related merge requests found
...@@ -626,7 +626,9 @@ identifier :: { Located RdrName } ...@@ -626,7 +626,9 @@ identifier :: { Located RdrName }
| qvarop { $1 } | qvarop { $1 }
| qconop { $1 } | qconop { $1 }
| '(' '->' ')' {% ams (sLL $1 $> $ getRdrName funTyCon) | '(' '->' ')' {% 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 -- Backpack stuff
......
:set -XTypeOperators
:i (~)
:k (~)
:set -fprint-equality-relations
:i (~)
class (a ~ b) => (~) (a :: k) (b :: k)
-- Defined in ‘Data.Type.Equality’
instance [incoherent] forall k (a :: k) (b :: k). (a ~ b) => a ~ b
-- Defined in ‘Data.Type.Equality’
(~) :: k -> k -> Constraint
class (a ~~ b) => (~) (a :: k) (b :: k)
-- Defined in ‘Data.Type.Equality’
instance [incoherent] forall k (a :: k) (b :: k). (a ~~ b) => a ~ b
-- Defined in ‘Data.Type.Equality’
...@@ -201,6 +201,7 @@ test('T9878', [], ghci_script, ['T9878.script']) ...@@ -201,6 +201,7 @@ test('T9878', [], ghci_script, ['T9878.script'])
test('T9878b', [extra_run_opts('-fobject-code')], ghci_script, test('T9878b', [extra_run_opts('-fobject-code')], ghci_script,
['T9878b.script']) ['T9878b.script'])
test('T10018', normal, ghci_script, ['T10018.script']) test('T10018', normal, ghci_script, ['T10018.script'])
test('T10059', normal, ghci_script, ['T10059.script'])
test('T10122', normal, ghci_script, ['T10122.script']) test('T10122', normal, ghci_script, ['T10122.script'])
test('T10321', normal, ghci_script, ['T10321.script']) test('T10321', normal, ghci_script, ['T10321.script'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment