Skip to content
Snippets Groups Projects
Commit 0c4a0c3b authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Marge Bot
Browse files

Make CallStacks work better with RebindableSyntax

As #19918 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".

* I also fixed #20126 thus:
     exprCtOrigin (HsIf {}) = IfThenElseOrigin
  (Previously it was "can't happen".)
parent 7b0ceafb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment