Finally, I managed to squash an infamous bug in :print
It turns out the newtype handling code in :print
was slipping non mutable Tyvars in the types reconstructed.
The error message eventually produced was rather obscure:
[src/Tp.hs:75:28-64] *MainTp> :p x
*** Exception: No match in record selector Var.tcTyVarDetails
[src/Tp.hs:75:28-64] *MainTp>
Due to non mutable tyvars, unifyType was failing.
A well placed assertion in the unifyType code would have made
my life much easier.
Which reminds me I should install a -ddump-* system in the
RTTI subsystem, or future hackers will run away in swearing.
MERGE TO STABLE