[GHC] #3693: Show stack traces
GHC
ghc-devs at haskell.org
Thu Feb 20 16:08:15 UTC 2014
#3693: Show stack traces
-------------------------------------+------------------------------------
Reporter: jpet | Owner: Tarrasch
Type: feature request | Status: new
Priority: normal | Milestone: 7.10.1
Component: Runtime System | Version: 6.10.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by scpmw):
> given a proposed Core-Core transformation, does the transformation meet
the specfification or not?
Simon covered the basic idea pretty well. From the transformation point of
view, the general rule of thumb is that source notes want to stay on
covered code (even if transformed), but don't care too much about new code
getting added in ("soft scope"). So we can for example work with fusion by
simply floating "upwards":
{{{
src<1.hs> foldr k z (src<2.hs> build g)
===> src<1.hs> src<2.hs> g k z
}}}
Cost-centres would disallow this kind of transformation, as the new stacks
have little to do with the old one. Source notes on the other hand want
the transformation to still happen, so we just annotate the new expression
with everything that appeared on the deconstructed source expression. The
paper goes into (way) more detail here, but the short version is that
while not always optimal, this approach is always legal.
The only special case so far is `let`- and `case`-floating, where we run
into the same problems as cost-centres (and use pretty much the same
solution). Additionally we decide to not care too much about allocation
costs at a number of points where it would have made things too messy.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/3693#comment:65>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list