You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To compare patterns, Pattern relies implicitly on that it can represent a given pattern on canonical form. On the other hand, Julia's types turn out not be on canonical form, at least not if they contain type variables.
The current workaround is to make sure that p & q will use the type guards from q that are at least as specific as in p, but this might not cover all future cases. The same Julia method might still be compiled several times with equivalent types signatures that are not isequal.
Proposed solution: A function that takes a Julia type and returns a canonical representative,
perhaps the first representative of that type that it did ever encounter. Use to normalize all types that will be hashed.
The text was updated successfully, but these errors were encountered:
To compare patterns,
Pattern
relies implicitly on that it can represent a given pattern on canonical form. On the other hand, Julia's types turn out not be on canonical form, at least not if they contain type variables.The current workaround is to make sure that
p & q
will use the type guards fromq
that are at least as specific as inp
, but this might not cover all future cases. The same Julia method might still be compiled several times with equivalent types signatures that are notisequal
.Proposed solution: A function that takes a Julia type and returns a canonical representative,
perhaps the first representative of that type that it did ever encounter. Use to normalize all types that will be hashed.
The text was updated successfully, but these errors were encountered: