
#10662: GHC warning shows technical summary of AST instead of the user's code -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Quite right! Reason: this message is generated by the desugarer, which only has typechecked code to print. Solution: when printing typechecked code, suppress details generated by the type checker itself. Details: * Sometimes we want to see those details, certainly during compiler debugging. And just conceivably for savvy users. So we need a flag to control it. * Quite a lot of supression goes on already. Example: `pprHsWrapper` uses `-dppr-debug` to control whether a `HsWrapper` get printed. But the `-dppr-debug` flag is a pretty low level thing that controls a lot of other debug-printing stuff too. * Nowadays we have `-fprint-explicit-foralls` and `-fprint-explicit- kinds`, so it might be better to add a new flat `-fprint-evidence` (or something) which shows you the extra evidence generated by the type checker. Nothing hard here, if someone would like to take it on. I can advise. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10662#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler