-
Notifications
You must be signed in to change notification settings - Fork 8
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
Polymorphism implementation sketch #69
Comments
This is indeed a complex next step! I'm excited for it, and it's worth carefully considering how to design the semantics. Here are just a few notes to get us started. At an extremely high level, I suggest we divide the effort (both design and implementation) into two phases:
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With functions in place, we can start thinking about polymorphism.
Implementation sketch
EVar
can either be anId
or aHole
. AHole
is a type parameter.def foo(a: int[M bank N])
parses toFunc(foo, List(a -> TArray((EVar(M), EVar(N))))
trait
to create an AST parameterized on the type ofId
.holes
to exist in:EAA
.CSeq
andCPar
constraints in a preambleM = 24
, we wantM % 4 = 0
foo[M, N](a, b)
foo
with these concrete values to a Set of concrete function instantiations.Even at a high level, this proposal implies 3-4 days of concerted hacking.
The text was updated successfully, but these errors were encountered: