diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-02-10 11:21:12 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-12 03:02:14 -0500 |
commit | 8b476d822e97cfe4cebe6e74924d9a79148d608c (patch) | |
tree | 56564304492798b0905f9ae05ce69da5e0859ca9 /testsuite | |
parent | 4a4ae70f09009c5d32696445a06eacb273f364b5 (diff) | |
download | haskell-8b476d822e97cfe4cebe6e74924d9a79148d608c.tar.gz |
Fix #16299 by deleting incorrect code from IfaceSyn
GHCi's `:info` command was pretty-printing Haskell98-style data types
with explicit return kinds if the return kind wasn't `Type`. This
leads to bizarre output like this:
```
λ> :i (##)
data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
-- Defined in ‘GHC.Prim’
```
Or, with unlifted newtypes:
```
λ> newtype T = MkT Int#
λ> :i T
newtype T :: TYPE 'IntRep = MkT Int#
-- Defined at <interactive>:5:1
```
The solution is simple: just delete one part from `IfaceSyn` where
GHC mistakenly pretty-prints the return kinds for non-GADTs.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T7627.stdout | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout index 8bf93a0d0f..ff4e67005e 100644 --- a/testsuite/tests/ghci/scripts/T7627.stdout +++ b/testsuite/tests/ghci/scripts/T7627.stdout @@ -7,8 +7,7 @@ instance Show () -- Defined in ‘GHC.Show’ instance Read () -- Defined in ‘GHC.Read’ instance Enum () -- Defined in ‘GHC.Enum’ instance Bounded () -- Defined in ‘GHC.Enum’ -data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##) - -- Defined in ‘GHC.Prim’ +data (##) = (##) -- Defined in ‘GHC.Prim’ () :: () (##) :: (# #) ( ) :: () @@ -29,9 +28,7 @@ instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ instance (Bounded a, Bounded b) => Bounded (a, b) -- Defined in ‘GHC.Enum’ -data (#,#) (a :: TYPE k0) (b :: TYPE k1) :: TYPE - ('GHC.Types.TupleRep '[k0, k1]) - = (#,#) a b +data (#,#) (a :: TYPE k0) (b :: TYPE k1) = (#,#) a b -- Defined in ‘GHC.Prim’ (,) :: a -> b -> (a, b) (#,#) :: a -> b -> (# a, b #) |