[GHC] #11049: Allow CallStacks to be hidden or cut
GHC
ghc-devs at haskell.org
Sun Nov 1 23:03:08 UTC 2015
#11049: Allow CallStacks to be hidden or cut
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets: #11035
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This is a spin off of #11035. I’d like to see a way for a function `foo`
* use another function `bar` with a `(?_::CallStack)` constraint so that
`bar` will _not_ print a call stack, and
* use another function `bar` with a `(?_::CallStack)` constraint so that
if `bar` prints a call stack, it will stop at the call to `foo`.
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11049>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list