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

GHC ghc-devs at haskell.org
Wed Nov 1 15:15:56 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 saurabhnanda):

 > You're right that the cost of adding a CallStack should be roughly
 equivalent to passing another argument around, plus the cost of allocating
 each source location in the stack.

 I'm amazed that this operation ends up causing a 2-3x slowdown, although,
 to be fair, the scale is in the range of ~100ns. I think a more realistic
 benchmark would be wrt actual IO or parsing, where the time-scale of
 underlying operations will outweigh the minor performance hit added by
 HasCallstack.

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


More information about the ghc-tickets mailing list