Skip to content

Make CallStacks work better with RebindableSyntax

Simon Peyton Jones requested to merge wip/T19918 into master

As #19918 (closed) pointed out, the CallStack mechanism didn't work well with RebindableSyntax.

This patch improves matters. See GHC.Tc.Types.Evidence Note [Overview of implicit CallStacks]

  • New predicate isPushCallStackOrigin distinguishes when a CallStack constraint should be solved "directly" or by pushing an item on the stack.

  • The constructor EvCsPushCall now has a FastString, which can describe not only a function call site, but also things like "the literal 42" or "an if-then-else expression".

Also fixes #20126 (closed)

Edited by Simon Peyton Jones

Merge request reports