Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages for operators #142

Open
fizruk opened this issue Nov 3, 2023 · 0 comments
Open

Improve error messages for operators #142

fizruk opened this issue Nov 3, 2023 · 0 comments

Comments

@fizruk
Copy link
Member

fizruk commented Nov 3, 2023

@TashiWalde reports that is not supported, but also that the error message is confusing.

Example code:

#def min
-- works
  ( A : U)
  ( σ : 2 → A)
  : (2 × 2) → A
  := \ (t , s) → recOR ( t ≤ s ↦ σ t , s ≤ t ↦ σ s)

#def min'
-- doesn't work
  ( A : U)
  ( σ : 2 → A)
  : (2 × 2) → A
  := \ (t , s) → recOR ( t ≤ s ↦ σ t , t ≥ s ↦ σ s)

Current error message:

when inferring type for term
  t ≥

when unifying expected type
  U
with actual type
  CUBE
for term
  2

This is because is treated as a regular variable name (since it is not reserved like ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant