[GHC] #11786: Need -fno-print-explicit-runtime-reps to work on IfaceType, else RuntimeRep leaks
GHC
ghc-devs at haskell.org
Mon Apr 4 08:50:09 UTC 2016
#11786: Need -fno-print-explicit-runtime-reps to work on IfaceType, else RuntimeRep
leaks
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
After #11549, 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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11786>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list