astampoulis / makam

The Makam Metalanguage
GNU General Public License v3.0
194 stars 11 forks source link

Report delayed constraints in the REPL #107

Open mb64 opened 3 years ago

mb64 commented 3 years ago

When delayed higher-order unification problems remain unsolved, it would be useful to see the remaining constraints in the REPL.

Currently, asking a query such as eq (F 5) 5 ? gives back

Yes:
F := F.

There is no indication that there are still delayed unification problems.

For prior art on this, asking a similar query in Twelf, Teyjus, or ELPI with -delay-problems-outside-pattern-fragment, they all give a list of remaining constraints (or "disagreement pairs" for Teyjus).

astampoulis commented 3 years ago

Thanks for reporting this issue @mb64 ! Printing deferred constraints is opt-in behavior in Makam right now, by using the directive %constraints+..

Arguably it should be enabled by default. In my mind that should be bundled together with:

mb64 commented 3 years ago

Thanks! %constraints+. does what I want. Feel free to close this issue, unless you want to leave it open to track your other proposed UI improvements for inspecting constraints.