Show instance for TypeReps is a bit broken
There are three problems.
-
Showing typereps of tuples can produce unnecessary parentheses:
Prelude K T> typeRep @(Int, Maybe Bool) (Int,(Maybe Bool))
The fix is trivial.
-
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.
-
Type operator applications are not shown infix.
Prelude K T> typeRep @(Maybe :*: Either Int) :*: * Maybe (Either Int)
This is the hardest problem to fix, although it's probably not too terribly hard. See ticket:14341#comment:143749 for thoughts.
Edited by Ömer Sinan Ağacan