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

Supporting the Iterator trait #985

Open
ROMemories opened this issue Oct 10, 2024 · 1 comment
Open

Supporting the Iterator trait #985

ROMemories opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working lib Lib-related issue (e.g. annotations lib)

Comments

@ROMemories
Copy link
Contributor

ROMemories commented Oct 10, 2024

hax does not currently seem to support the Iterator trait in F*, when manually implementing it.
For instance, the following does get extracted to F*, but does not lax check:

struct Foo;

impl Iterator for Foo {
    type Item = ();

    fn next(&mut self) -> Option<Self::Item> {
        None
    }
}

view in hax playground

Lax checking currently outputs the following:

* Error 72 at Playground.fst(9,36-9,46):
  - Identifier not found: [Core.Iter.Traits.Iterator.t_Iterator]
  - Module Core.Iter.Traits.Iterator resolved into Core.Iter.Traits.Iterator,
    definition t_Iterator not found

cc future-proof-iot/RIOT-rs#460

@W95Psp
Copy link
Collaborator

W95Psp commented Oct 10, 2024

Thanks for the bug report!
Things are indeed a bit rough on the edges around iterators.

We won't have time this week to take a look, but we will try to find an answer next week.

@W95Psp W95Psp added bug Something isn't working lib Lib-related issue (e.g. annotations lib) labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib Lib-related issue (e.g. annotations lib)
Projects
None yet
Development

No branches or pull requests

2 participants