hax icon indicating copy to clipboard operation
hax copied to clipboard

Supporting the `Iterator` trait

Open ROMemories opened this issue 1 year ago • 3 comments

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 https://github.com/future-proof-iot/RIOT-rs/pull/460

ROMemories avatar Oct 10 '24 13:10 ROMemories

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 avatar Oct 10 '24 14:10 W95Psp

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Oct 23 '25 00:10 github-actions[bot]

This is because of #888

maximebuyse avatar Oct 30 '25 12:10 maximebuyse