[Haskell-cafe] Printing call site for partial functions

Michael Snoyman michael at snoyman.com
Thu Apr 26 10:01:42 CEST 2012


On Wed, Apr 25, 2012 at 7:28 PM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:
> Hi,
>
> On 25 April 2012 16:36, Michael Snoyman <michael at snoyman.com> wrote:
>>
>>    Prelude.head: empty list
>
>
> Recent versions of GHC actually generate a very helpful stack trace, if the
> program is compiled with profiling turned on and run with -xc.
>
> See: http://community.haskell.org/~simonmar/slides/HIW11.pdf
> (Ironically titled "Prelude.head: empty list")
>
> HTH,
> Ozgur
>

I certainly think that stack traces are going to be a powerful
debugging tool, and I'm looking forward to using them. But I think
this feature would be useful in and of itself. I'm presuming it won't
be the default to have stack traces turned on due to performance
overhead (is that a faulty assumption?). This feature would be
available for all builds and give you a very high amount of useful
information- though not quite as much as a stack trace- without any
(serious) performance impact.

Michael



More information about the Haskell-Cafe mailing list