[GHC] #10193: TypeRep Show instance doesn't add parens around type operators

GHC ghc-devs at haskell.org
Fri Mar 27 12:31:30 UTC 2015


#10193: TypeRep Show instance doesn't add parens around type operators
-------------------------------------+-------------------------------------
        Reporter:  pawel.nowak       |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  libraries/base    |                 Version:  7.10.1-rc3
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by pawel.nowak):

 Replying to [comment:1 thomie]:
 > Fwiw, GHCi does the right thing already:
 Yes, but I think it works on GHC's internal Type, not on Typeable's
 TypeRep.
 \\

 After some more thought, it would be useful to have an instance that
 prints a valid Haskell type, that is:
 * Parens around operators,
 * Fully qualified types,
 * No kinds - right now a TypeRep of e.g. "V 5" from Linear.V is printed as
 "V Nat 5".

 I'll implement that in Hint for now, but it would be nice to have that in
 Data.Typeable, possibly as an alternative to the current show instance.

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


More information about the ghc-tickets mailing list