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

change variant match function to use CallDefined? #43

Closed
jckarter opened this issue Dec 11, 2011 · 0 comments
Closed

change variant match function to use CallDefined? #43

jckarter opened this issue Dec 11, 2011 · 0 comments

Comments

@jckarter
Copy link
Owner

Instead of interleaving the instance types and lambdas:

match(variant, Inst1, i1 -> { .. }, Inst2, i2 -> { .. });

The match function would be cleaner if it dispatched matching based on the lambda signature:

match(variant, (i1:Inst1) -> { .. }, (i2:Inst2) -> { .. });

which would look nice with block syntax:

match(variant): (i1:Inst1) -> {
  ..
}, (i2:Inst2) -> {
  ..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant