Skip to content

Type equality? #8

@Nadrieril

Description

@Nadrieril

You mention in the README that you couldn't get type equality to work. I was curious to know what kind of things you've tried.
Just in case you hadn't seen it, there's a trick described here that seems relevant:

trait Id {
  type X;
}
impl<T> Id for T {
  type X = T;
}

Then you can use where T: Id<X=U> that functions like where T == U.
Using this and specialization, I'm under the impression that you could implement if T == U in your language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions