[GHC] #16030: Poor pretty-printing of GADT constructors in GHCi

GHC ghc-devs at haskell.org
Thu Dec 20 10:19:32 UTC 2018


#16030: Poor pretty-printing of GADT constructors in GHCi
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.7
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D5440
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sheaf):

 Does this patch also add `@`s in the following situation?

 {{{#!hs
 data Foo (is :: [Type]) where
   AnyFoo :: Foo is

 type NilFoo = (AnyFoo :: Foo '[])
 }}}

 `> :set -fprint-explicit-kinds`\\
 `> :info NilFoo`\\
 `type NilFoo = 'AnyFoo ('[] Type) :: Foo ('[] Type)`

 I've got code which uses a lot of different kinds, and `-fprint-explicit-
 kinds` helps me to understand why e.g. some type family applications are
 not computing (because of kind reasons), but I find the output quite hard
 to read because some types are passed as arguments where I would be
 expecting a type application. I would prefer the output to be:

 `type NilFoo = 'AnyFoo ('[] @Type) :: Foo ('[] @Type)`

 Let me know if that's reasonable. (I don't know what the visible kind
 application patch changes about this either.)

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16030#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list