Make CallStacks work better with RebindableSyntax
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
isPushCallStackOrigi
n distinguishes when aCallStack
constraint should be solved "directly" or by pushing an item on the stack. -
The constructor
EvCsPushCall
now has aFastString
, 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)