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

Add a way to canonicalize types #6

Open
toivoh opened this issue Jan 5, 2013 · 0 comments
Open

Add a way to canonicalize types #6

toivoh opened this issue Jan 5, 2013 · 0 comments

Comments

@toivoh
Copy link
Owner

toivoh commented Jan 5, 2013

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.

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

No branches or pull requests

1 participant