[GHC] #13360: Add a flag to enable inferring HasCallStack constraints

GHC ghc-devs at haskell.org
Wed Nov 1 12:46:21 UTC 2017


#13360: Add a flag to enable inferring HasCallStack constraints
-------------------------------------+-------------------------------------
        Reporter:  gridaphobe        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.0.1
      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:                    |
-------------------------------------+-------------------------------------

Comment (by gridaphobe):

 > What would be a sensible way to benchmark this runtime cost?

 I did a couple [https://github.com/gridaphobe/located-
 base/blob/master/bench/Bench.hs microbenchmarks] a while ago. They only
 test the cost of constructing and passing the `CallStack` around, so it's
 not necessarily an accurate reflection of the cost of enabling
 `HasCallStack` in real-world code. Your benchmarks would be a valuable
 addition!

 > The perf impact of HasCallstack would be significantly lower than
 compiling with profiling enabled, right?

 I suspect so, since the profiling machinery can also interfere with
 optimizations whereas the `CallStack`s do not, but I've never checked the
 difference.

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


More information about the ghc-tickets mailing list