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

Arity analysis confused by abbreviation #2895

Closed
mtzguido opened this issue Apr 27, 2023 · 0 comments
Closed

Arity analysis confused by abbreviation #2895

mtzguido opened this issue Apr 27, 2023 · 0 comments
Assignees

Comments

@mtzguido
Copy link
Member

mtzguido commented Apr 27, 2023

type comparator_for (t:Type) = t -> t -> bool

val univ_eq : comparator_for int
let rec univ_eq (u1 u2 : int) : bool = false

This could be accepted, but F* complains that "Recursive functions must be introduced at arrow types", I believe due to taking bool as the annotation and ignoring the two binders. Dropping the annotations makes it work.

@mtzguido mtzguido self-assigned this Apr 27, 2023
mtzguido added a commit to mtzguido/FStar that referenced this issue May 3, 2023
Use N.get_n_binders () to obtain the needed amount of binders without
over flattening.

Fixes FStarLang#2895
mtzguido added a commit that referenced this issue May 5, 2023
This allows to have an abbreviated expected type as long as it reduces
to an arrow.

Use N.get_n_binders () to obtain the needed amount of binders without
over flattening.

Fixes #2895
mtzguido added a commit that referenced this issue May 5, 2023
mtzguido added a commit that referenced this issue May 7, 2023
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