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

Recognize Fin instances as nat literals too? #706

Open
ice1000 opened this issue Nov 20, 2022 · 5 comments
Open

Recognize Fin instances as nat literals too? #706

ice1000 opened this issue Nov 20, 2022 · 5 comments
Labels

Comments

@ice1000
Copy link
Member

ice1000 commented Nov 20, 2022

@imkiva any ideae?

@imkiva
Copy link
Member

imkiva commented Nov 20, 2022

Actually there's a Fin shape from the very beginning, but I gave up when I need to create a Nat where a representation of Fin is needed. But I am not sure if it becomes simpler with MetaLit now. Will give it a try.

@ice1000
Copy link
Member Author

ice1000 commented Nov 20, 2022

@imkiva You just have to generate fsuc a instead of suc a, but this has to be a concrete syntax.

@HoshinoTented
Copy link
Contributor

HoshinoTented commented May 9, 2023

One possible problem is type inferring, we won't infer 114514 : {?} to 114514 : Fin 0.
Inferring a meta Fin (114514 + {?}) would be a big challenge.

@ice1000
Copy link
Member Author

ice1000 commented May 9, 2023

lmao yeah

@ice1000
Copy link
Member Author

ice1000 commented Jun 4, 2024

We should do index erasure in an IR and run the shape matcher again. Vec will be matched with List and Fin/ will be matched with Nat.

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

3 participants