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

Traits cannot be imported by their original module when they are part of a bundle #1285

Open
maximebuyse opened this issue Feb 3, 2025 · 1 comment
Labels
f* F* backend

Comments

@maximebuyse
Copy link
Contributor

Example:

mod a {
    pub fn g(){super::b::h()}
    
    trait A {}

}
mod b {
    pub fn h(){super::a::g()}
}

Open this code snippet in the playground

If we have include Playground.Bundle {t_A as t_A} in Playground.A.fst, F* complains with something like: Definition Playground.Bundle.__proj__Mkt_A__item__v_Self cannot be found`.

For now the solution to avoid this error is to remove this include but this doesn't work if the trait is used outside the bundle. This probably needs a fix in F*

@maximebuyse
Copy link
Contributor Author

This problem is not limited to traits, the same happens with parametric structs (like struct Foo<const N: usize> {...}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f* F* backend
Projects
None yet
Development

No branches or pull requests

1 participant