Type intersection. This was necessary to evaluate if an incoming type needs to be amended to deal with the type restrictions of the called function.
Backpropagating type inference! At least, in a basic sense. This doesn't know anything what to do if there's an internal type conflict, yet, but at least it can take a lambda and correctly type both the input parameters AND the output parameters:
Going to take a bit of a break from this project tomorrow to do coding interviews and the like, but this is in a good spot. I just need to think about how to rearchitect the system to be a bit smarter about cataloging all of the opcodes we're liable to see fly by.
completed two things
Type intersection. This was necessary to evaluate if an incoming type needs to be amended to deal with the type restrictions of the called function.
Backpropagating type inference! At least, in a basic sense. This doesn't know anything what to do if there's an internal type conflict, yet, but at least it can take a lambda and correctly type both the input parameters AND the output parameters:
https://github.com/ityonemo/mavis/blob/master/test/type_test.exs#L126
Going to take a bit of a break from this project tomorrow to do coding interviews and the like, but this is in a good spot. I just need to think about how to rearchitect the system to be a bit smarter about cataloging all of the opcodes we're liable to see fly by.