We currently side-step the problem of type inference by requiring that every let binding must be explicitly annotated:
let (x: int) = length l in
...
This works, but is not ideal because it means we have to modify the programs a little.
Seeing as we're already using the compiler infrastructure in other parts of the project, we should be able to make the sanitization process more general by using the compiler to infer types for every binding, instead of using a syntactic restriction.
We currently side-step the problem of type inference by requiring that every let binding must be explicitly annotated:
This works, but is not ideal because it means we have to modify the programs a little.
Seeing as we're already using the compiler infrastructure in other parts of the project, we should be able to make the sanitization process more general by using the compiler to infer types for every binding, instead of using a syntactic restriction.