JoshTriplett: there *is* one place where we sort of need to add it
JoshTriplett: which is, say, unify(for<'a> fn(<T as Trait<'a>>::X), fn(U)) needs to also output for<'a> <T as Trait<'a>>::X == U
JoshTriplett: but just impl HashSet<MyStruct> {} doesn't do any unification, because unlike Haskell (I guess?), there is no type at the declaration site, but rather a name and generic parameters
JoshTriplett: so you're *instantiating* HashSet with K = MyStruct
JoshTriplett: which results in a type that looks like Adt(HashSet, [MyStruct])
JoshTriplett: and none of that sees the bounds of HashSet
WF is responsible for dealing with things like that, and that runs *later* (because you need to be able to understand all the types ahead of checking they're WF)
JoshTriplett: oh let me rephrase something :)
JoshTriplett: struct HashSet<K: Hash> {} is actually struct HashSet<K> where K: Hash {} *not the other way around*
JoshTriplett
eddyb: I guess I really don't want there to be a difference between those two.
I always thought they were just syntactically different, not semantically different.
eddyb
JoshTriplett: the former desugars into the latter, effectively
JoshTriplett
That's fine.
eddyb
i.e. forall a.(Hash a) => HashSet a. but Haskell is really bad at this anyway
(I get angry every time I have to deal with its conflation of 2-3 concepts within the same syntax)