Improve default pretty-printing of coercion axioms
I find the default pretty-printing of coercion axioms to be quite verbose. For example for a type family type family RR :: RuntimeRep where { RR = IntRep }
, we get coercions such as:
(Int# |> (TYPE (Sym (ModuleName.D:R:RR[0])))_N)
It seems a bit over the top to always include the fully qualified name. See GHC.Tc.Utils.Env.mk_fam_inst_name
, which seems to be the source of these names.
In addition, there are redundant parentheses in the case that the family axiom is nullary.
Finally, it would be nice to improve the documentation somewhat; I think the D
is to be contrasted with N
for a newtype axiom, whereas the R
is simply the role of the axiom. But that doesn't really seem to be spelled out anywhere.