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

[WIP] Opaque type generics #402

Closed
wants to merge 3 commits into from

Conversation

detrumi
Copy link
Member

@detrumi detrumi commented Apr 17, 2020

Opaque types should accept generic parameters, probably something like this:

program {
    trait Iterator { type Item; }

    struct Vec<T> { }
    struct u32 { }
    impl<T> Iterator for Vec<T> {
        type Item = T;
    }

    opaque type Foo<X>: Iterator<Item = X> = Vec<X>;
}

goal {
    Foo<u32>: Iterator<Item = u32>
} yields {
    "Unique; substitution []"
}

@nathanwhit nathanwhit mentioned this pull request May 20, 2020
@detrumi
Copy link
Member Author

detrumi commented May 21, 2020

Closing in favor of #464

@detrumi detrumi closed this May 21, 2020
@detrumi detrumi deleted the opaque-ty-generics branch January 31, 2021 08:12
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

Successfully merging this pull request may close these issues.

1 participant