
#16299: :info pretty-prints data types with non-Type return kinds oddly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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 [https://phabricator.haskell.org/D4777 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16299 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler