[GHC] #15559: fromJust has no HasCallStack

GHC ghc-devs at haskell.org
Thu Aug 23 01:40:15 UTC 2018


#15559: fromJust has no HasCallStack
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Core Libraries    |              Version:  8.4.3
      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 bgamari):

 * cc: gridaphobe (added)


Comment:

 When `HasCallStack` was introduced we intentionally did not introduce
 constraints to partial functions, no matter how small. IIRC this was in
 part because we expected third-party libraries to fill this need and in
 part it was out of concern for performance (since you would incur the cost
 of an additional argument, and potentially allocation, if the function
 isn't inlined). However, at this point it seems like `HasCallStack` is
 pretty well-accepted. It seems to me that we could start considering
 slowly adding `HasCallStack`s around in functions that are either (a)
 nearly certain to inline, or (b) not performance critical.

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


More information about the ghc-tickets mailing list