
#14219: Include source location information in -ddump-rule-rewrites -------------------------------------+------------------------------------- Reporter: harendra | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 (Debugging) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Debugging Unknown/Multiple | information is incorrect Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Inlining is one of the most common and powerful optimizations and it interacts with rewrite-rules which is also common the libraries including base. When debugging a performance problem we are interacting with the rewrite-rules written by others hidden somewhere in some library that we are using. When I use the `-ddump-rule-rewrites` option I get an output like this: {{{ Rule fired Rule: Class op >>= Module: (BUILTIN) Before: GHC.Base.>>= TyArg GHC.Types.IO ValArg GHC.Base.$fMonadIO After: GHC.Base.$fMonadIO1 }}} This does not say where exactly this rule is defined in the source. It is sort of ok if this is my code I would perhaps know where this rule is. But when it is in some dependency that I am using it is hard to find. It will be really helpful if the source location information can be provided in this dump information, so that one can go and examine the source. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14219 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler