Proposal: add HasCallStack for all partial functions in base
Henning Thielemann
lemming at henning-thielemann.de
Sun Jun 16 14:49:26 UTC 2019
On Sun, 16 Jun 2019, LuoChen wrote:
> On the other hand, is it ever necessary for us to add HasCallStack for a
> total function? Or we can ask, is it possible that a call to a total
> function cause runtime error? Maybe it’s a NO, since a total function
> will also crash when the machine is Out Of Memory, but that is also the
> only situation I can find out.
A non-IO function 'f' cannot crash because of memory exhaustion. The IO
function calling 'f' is the one that crashes. A call stack would not help
because it is not a programming error in 'f'.
More information about the Libraries
mailing list