And sorry if my tone on those emails was a bit snarky. It was late... though
snarkiness at any hour is unwelcome. :)
I understand the concerns about the Show instance, though I have no opinion
about the name of the pretty-printer. My only request is that the pretty-print
function is easily
On Mon, Dec 7, 2015, at 06:15, Richard Eisenberg wrote:
> And sorry if my tone on those emails was a bit snarky. It was late...
> though snarkiness at any hour is unwelcome. :)
>
> I understand the concerns about the Show instance, though I have no
> opinion about the name of the
Eric Seidel writes:
> Hi Richard,
>
> Sorry for all of the confusion, it seems the docs do indeed need some
> love!
>
> On Sun, Dec 6, 2015, at 20:56, Richard Eisenberg wrote:
>> That looks like exactly what I want. Thanks.
>>
>> There remain two mysteries:
>> - I thought that
If you're debugging GHC, I've recently added pprSTrace :: (?location ::
CallStack) => SDoc -> a -> a in Outputable. It's been a great help for me
in understanding where the calls were coming from. You can just use it
without importing anything extra, and when you want more context you just
add
On 07/12/15 11:59, Ben Gamari wrote:
>> If the name "showCallStack" suggests the compiler-derived output, we
>> could change it to something like "prettyCallStack" or
>> "formatCallStack", I don't have a strong opinion there.
>
> I have also struggled with these sorts of naming decisions. The
>
> > As quite a separate point from above, I may have found a bug: I put a
> > (?callstack :: CallStack) constraint on TcEvidence.mkTcTransCo and then
> > put the same constraint on TcCanonical.rewriteEqEvidence. GHC complained
> > about a redundant constraint on rewriteEqEvidence, and indeed its
On Dec 7, 2015, at 2:23 PM, Eric Seidel wrote:
> After staring at your bug confusedly for a few minutes, wondering why I
> couldn't simplify it, I realized that the actual warning I was getting
> was in *mkTcTransCo*, not rewriteEqEvidence. mkTcTransCo does not in
> fact use a
Oh I forgot to mention that I was testing on my local branch which fixes
precisely this kind of bug when the CallStack is used inside a let-binder,
which is what happens in rewriteEqEvidence.
So it looks like my patch takes care of this issue. Thanks for the report!
Sent from my iPhone
> On
There's a function for that:
https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Stack.html#v:showCallStack
On Sun, Dec 6, 2015 at 8:43 PM, Richard Eisenberg wrote:
> Hi devs,
>
> I wish to use the new CallStack feature to track call sites of a function.
> I want my
On Sun, Dec 6, 2015 at 11:56 PM, Richard Eisenberg
wrote:
> That looks like exactly what I want. Thanks.
>
> There remain two mysteries:
> - I thought that CallStacks were a new feature that would come with GHC
> 8.0. Yet it seems the datatype is present in base-4.8.x. Even
That looks like exactly what I want. Thanks.
There remain two mysteries:
- I thought that CallStacks were a new feature that would come with GHC 8.0.
Yet it seems the datatype is present in base-4.8.x. Even though the docs even
say (wrongly, evidently) that it's in base since 4.9.
- That
Also, a call stack frame is just a (name, srcloc) pair, so you can
format it yourself. I use:
show_stack :: CallStack -> String
show_stack = maybe "" show_frame . Seq.last . Stack.getCallStack
where
show_frame (name, srcloc) =
SrcLoc.srcLocFile srcloc ++ ":" ++ show
Hi devs,
I wish to use the new CallStack feature to track call sites of a function. I
want my function to print out where it was called from. I do not want to call
`error`. How do I do this?
I looked in the release notes. They describe the CallStack feature at an
overview, and the docs
Hi Richard,
Sorry for all of the confusion, it seems the docs do indeed need some
love!
On Sun, Dec 6, 2015, at 20:56, Richard Eisenberg wrote:
> That looks like exactly what I want. Thanks.
>
> There remain two mysteries:
> - I thought that CallStacks were a new feature that would come with
14 matches
Mail list logo