Need -fno-print-explicit-runtime-reps to work on IfaceType, else RuntimeRep leaks
After #11549 (closed), we are suppose not to show RuntimeRep
to users, when -fno-print-explicit-runtime-reps
is on. But we do:
:info ($)
Prelude> :i ($)
($) :: forall (r :: GHC.Types.RuntimeRep) a (b :: TYPE r).
(a -> b) -> a -> b
-- Defined in ‘GHC.Base’
This happens because the runtime-rep-suppression happens on Type
, but for :info
we use pprInfo
which uses tyThingToIfaceDecl
and then prints it. And tyThingToIfaceDecl
doesn't know about the -fprint-explicit-runtime-reps
flag; and I'd like to keep it that way.
We want to change pprType
to convert to IfaceType
and then print anyway.
I suppose that this means that the pretty-printer for IfaceType
needs to know about this runtime-rep suppression. That's a bit tiresome, but not impossible, especially since there is no shadowing to worry about.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |