:info pretty-prints data types with non-Type return kinds oddly
Consider this GHCi session:
$ ghci -XUnboxedTuples
GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/ryanglscott/.ghci
λ> :i (##)
data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
-- Defined in ‘GHC.Prim’
Notice that we're printing data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
. Yuck! Granted, you can't define an unboxed tuple like this anyway, but the presence of that kind signature (which definitely doesn't belong in a Haskell98-style data declaration) makes things worse.
In case if you're wondering if this is an unboxed tuple–specific problem, it's not. This issue also creeps up in the WIP implementation of unlifted newtypes:
λ> newtype T = MkT Int#
λ> :i T
newtype T :: TYPE 'IntRep = MkT Int#
-- Defined at <interactive>:5:1
However, as this ticket demonstrates, this problem has existed well before the unlifted newtypes patch, and more importantly, this can be fixed independently of that patch.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |