Skip to content

Show relevant constraints below goal type and context - #3716

Merged
jespercockx merged 1 commit into
agda:masterfrom
jespercockx:GoalConstraints
Apr 29, 2019
Merged

jespercockx merged 1 commit into
agda:masterfrom
jespercockx:GoalConstraints

Conversation

@jespercockx

Copy link
Copy Markdown
Member

I get annoyed endlessly by the fact that "show goal type and context" doesn't show any constraints. This is especially annoying for HITs in cubical agda. This patch just gathers all the constraints that mention the goal meta and displays them below the context.

I'm not sure if it is a good idea to always display the constraints as I do here, maybe there should be an extra flag and/or prefix to the goal commands to turn them on or off.

@jespercockx

Copy link
Copy Markdown
Member Author

Another approach could be to have a separate buffer for displaying the constraints at all times. That way you wouldn't have to scroll down the (potentially long) list of all variables in scope.

@Saizan

Saizan commented Apr 26, 2019

Copy link
Copy Markdown
Collaborator

Good thing I saw this today! I was going to start working on it.

If we merge #3723 it would be good to make the mentionsMeta check look through blocking metas, possibly by just relying on stInstantiateBlocking.

@jespercockx

Copy link
Copy Markdown
Member Author

Yes, the check that the constraint mentions the interaction meta is just a first rough approximation. We could also replace it by a better heuristic to determine when a constraint is relevant to the current goal, if someone has an idea.

@jespercockx

Copy link
Copy Markdown
Member Author

As there are no negative comments, I'll go ahead and merge this now. Hopefully we'll get some feedback when people actually start to use it.

@jespercockx
jespercockx merged commit abb4bbd into agda:master Apr 29, 2019
@jespercockx
jespercockx deleted the GoalConstraints branch April 29, 2019 07:30
@jespercockx jespercockx added type: enhancement Issues and pull requests about possible improvements constraints Constraints (postponed type checking problems, postponed unification problems, instance constraints) ux: interaction Issues to do with interactive development (holes, case splitting, etc) labels Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

constraints Constraints (postponed type checking problems, postponed unification problems, instance constraints) type: enhancement Issues and pull requests about possible improvements ux: interaction Issues to do with interactive development (holes, case splitting, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants