diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-06-07 13:30:44 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-07 18:06:30 -0400 |
commit | 3397396a385ef9f493cf1e20894e88d21dfec48d (patch) | |
tree | 66fe52660bf82b6485b12d2456728d4527662616 /testsuite/tests/ghci/should_run | |
parent | 5926b6ed0dcc86f8fd6038fdcc5e2ba2856f40ce (diff) | |
download | haskell-3397396a385ef9f493cf1e20894e88d21dfec48d.tar.gz |
Fix #15236 by removing parentheses from funTyConName
Currently, `funTyConName` is defined as:
```lang=haskell
funTyConName = mkPrimTyConName (fsLit "(->)") funTyConKey funTyCon
```
What's strange about this definition is that there are extraneous
parentheses around `->`, which is quite unlike every other infix
`Name`. As a result, the `:info (->)` output is totally garbled (see
Trac #15236).
It's quite straightforward to fix that particular bug by removing the
extraneous parentheses. However, it turns out that this makes some
test output involving `Show` instances for `TypeRep` look less
appealing, since `->` is no longer surrounded with parentheses when
applied prefix. But neither were any /other/ infix type constructors!
The right fix there was to change `showTypeable` to put parentheses
around prefix applications of infix tycons.
Test Plan: ./validate
Reviewers: bgamari, hvr
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15236
Differential Revision: https://phabricator.haskell.org/D4799
Diffstat (limited to 'testsuite/tests/ghci/should_run')
-rw-r--r-- | testsuite/tests/ghci/should_run/T10145.stdout | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/should_run/T10145.stdout b/testsuite/tests/ghci/should_run/T10145.stdout index 873b992a38..6ae0c4ccfe 100644 --- a/testsuite/tests/ghci/should_run/T10145.stdout +++ b/testsuite/tests/ghci/should_run/T10145.stdout @@ -1,5 +1,5 @@ data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’ -infixr 0 `(->)` +infixr 0 -> instance Applicative ((->) a) -- Defined in ‘GHC.Base’ instance Functor ((->) r) -- Defined in ‘GHC.Base’ instance Monad ((->) r) -- Defined in ‘GHC.Base’ |