
#11179: Allow plugins to access "dead code" -------------------------------------+------------------------------------- Reporter: lerkok | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * related: #10823 => Comment: I have his this problem as well now. I don’t like any solution that requires unwieldy interaction from the user. That leaves * not removing dead code in the desugarer or * adding a hook to the plugins interface to interact with the code before desugaring (and maybe mark bindings as “please keep”) While the second one would surely be useful for many other things, I wonder why we not simply do the first one. We remove dead code later anyways (do we?), and the extra cost of desugaring dead code seems to be neglectible, as there usually is no dead code. (And if there is, then most likely for a good reason – e.g. to be picked up by plugins). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11179#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler