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

Feature: Syntax and delaborator for TypeVec and Fin2s #29

Open
alexkeizer opened this issue Jul 6, 2024 · 0 comments
Open

Feature: Syntax and delaborator for TypeVec and Fin2s #29

alexkeizer opened this issue Jul 6, 2024 · 0 comments
Labels

Comments

@alexkeizer
Copy link
Owner

Types like the following will occasionally show up in type errors, but are not particularly readable:

(Vec.append1 (Vec.append1 (Vec.append1 Vec.nil (Prj (Fin2.fs Fin2.fz))) (Prj Fin2.fz))
      (Comp (TypeFun.ofCurried (MvQPF.Arrow α)) (Vec.append1 Vec.nil (Prj (Fin2.fs Fin2.fz))))
      Fin2.fz

It would be nicer if we had syntax (and accompanying pretty printers!) for typevectors and Fin2s.
For example, we could use !![...] list notation, and &0, &1, etc.
Then, the above type could be pretty printed as:

!![MvQPF.Prj &1, MvQPF.Prj &0, Comp (TypeFun.ofCurried (MvQPF.Arrow α)) !![Prj &1]] &0

Making it much more obvious that the TypeVec is being indexed by the last Fin2.

@alexkeizer alexkeizer added the easy label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant