Open cvauclair opened 3 years ago
The Mesh Language should support type annotations (via type expressions) in let bindings to help the type checker when a type cannot be inferred.
Example:
let (x: int) = 2; let (f: int => int) = (x) => x + 1;
Tentative approach: Modify the let binding definition to include optional type annotations.
// Old ELet type expr = | ELet(pattern, expr) ... ; // New ELet type expr = | ELet(pattern, expr, option(typ)) ... ;
@ThierryBleau can you review the tentative approach outlined above?
Description
The Mesh Language should support type annotations (via type expressions) in let bindings to help the type checker when a type cannot be inferred.
Example:
Tentative approach: Modify the let binding definition to include optional type annotations.