summaryrefslogtreecommitdiff
path: root/compiler/iface/IfaceSyn.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-02-10 11:21:12 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-12 03:02:14 -0500
commit8b476d822e97cfe4cebe6e74924d9a79148d608c (patch)
tree56564304492798b0905f9ae05ce69da5e0859ca9 /compiler/iface/IfaceSyn.hs
parent4a4ae70f09009c5d32696445a06eacb273f364b5 (diff)
downloadhaskell-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 'compiler/iface/IfaceSyn.hs')
-rw-r--r--compiler/iface/IfaceSyn.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 5478c941c0..3dd8a21173 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -713,7 +713,7 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype,
, nest 2 (vcat pp_cons)
, nest 2 $ ppShowIface ss pp_extra ]
| otherwise = vcat [ pp_roles
- , hang (pp_nd <+> pp_lhs <+> pp_kind) 2 (add_bars pp_cons)
+ , hang (pp_nd <+> pp_lhs) 2 (add_bars pp_cons)
, nest 2 $ ppShowIface ss pp_extra ]
where
is_data_instance = isIfaceDataInstance parent