
#14341: Show instance for TypeReps is a bit broken -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 8.2.1 Libraries | Keywords: Typeable | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): Phab:D4084 | Wiki Page: -------------------------------------+------------------------------------- There are two problems. 1. Showing typereps of tuples can produce unnecessary parentheses: {{{ Prelude K T> typeRep @(Int, Maybe Bool) (Int,(Maybe Bool)) }}} The fix is trivial. 2. Showing typereps of ticked (i.e., lifted) tuples and lists gives hard- to-read results, because it does not use the usual special syntax: {{{ Prelude K T> typeRep @'(Int, Maybe Bool) '(,) * * Int (Maybe Bool) Prelude K T> typeRep @'[1,2,3] ': Nat 1 (': Nat 2 (': Nat 3 ('[] Nat))) }}} Fixing the lifted tuple case is trivial. Fixing the lifted list case is slightly less trivial, but not hard. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14341 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler