How do I use CallStack?

Eric Seidel eric at
Mon Dec 7 19:23:14 UTC 2015

> > 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 call
> > information wasn't propagated. rewriteEqEvidence uses pattern guards and
> > do-notation, but that shouldn't muck with CallStack, should it? I've not
> > tried to reproduce this in a smaller test case.

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 CallStack (by default) so the redundant constraint warning
there would be correct. If I add a call to error, everything seems to
check out.

Can you confirm?


More information about the ghc-devs mailing list