#7240: Stack trace truncated too much with indirect recursion
------------------------------+---------------------------------------------
 Reporter:  nomeata           |          Owner:  nomeata         
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Profiling       
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------

Comment(by nomeata):

 Hmm, I’d prefer to update the bug description, but it seems that I do not
 have the rights for that. Anyways, here is a simpler and cleaner
 description of the problem. Consider this code:

 {{{
 module Main where
 import GHC.Stack

 f () = currentCallStack >>= putStrLn . renderStack
 main = boringCombinator (interestingFunction f) ()
 interestingFunction f x = boringCombinator f x
 boringCombinator f x = f x
 }}}

 Currently, it prints:
 {{{
 Stack trace:
   Main.f (callstack005.hs:4:8-50)
   Main.boringCombinator (callstack005.hs:7:24-26)
   Main.main (callstack005.hs:5:8-50)
   Main.CAF (<entire-module>)
 }}}
 when I, as a developer, would expect this output:
 {{{
 Stack trace:
   Main.f (callstack005.hs:4:8-50)
   Main.boringCombinator (callstack005.hs:7:24-26)
   Main.interestingFunction (callstack005.hs:6:27-46)
   Main.main (callstack005.hs:5:26-46)
   Main.boringCombinator (callstack005.hs:7:24-26)
   Main.main (callstack005.hs:5:8-50)
   Main.CAF (<entire-module>)
 }}}
 This output is obtained by either not truncating at all, or only
 truncating repeating segments of the callstack.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7240#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to