Allow CallStacks to be hidden or cut
This is a spin off of #11035. I’d like to see a way for a function foo
- use another function
barwith a(?_::CallStack)constraint so thatbarwill not print a call stack, and - use another function
barwith a(?_::CallStack)constraint so that ifbarprints a call stack, it will stop at the call tofoo.
This might be possible to implement with a special rootCallStack :: CallStack which is a value such that
x `pushCallStack` rootCallStack = rootCallStack
but
rootCallStack `pushCallStack` x = rootCallStack “:” x
as before and a call stack that consists of only a rootCallStack causes no stack trace to be printed.
The use case is to provide the user of a library less cluttered call stacks that do not expose unhelpful details and allow her to quickly spot the relevant information.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |