The MLscript programming language. Functional and object-oriented; structurally typed and sound; with powerful type inference. Soon to have full interop with TypeScript!
The annotation for let-binding was not handled correctly:
// the annotation `forall 'a : 'a -> 'a` is ignored
fun foo(f) =
let g: forall 'a : 'a -> 'a = x => f(x) in g(123)
//│ fun foo: forall 'a. (123 -> 'a) -> 'a
fun foo(f) =
let g = (x => f(x)): forall 'a : 'a -> 'a in g(123)
//│ fun foo: (??a -> ??a0) -> 123
This simple PR fixed this problem so that two given functions above have the same type:
fun foo(f) =
let g = (x => f(x)): forall 'a : 'a -> 'a in g(123)
//│ fun foo: (??a -> ??a0) -> 123
fun foo(f) =
let g: forall 'a : 'a -> 'a = x => f(x) in g(123)
//│ fun foo: (??a -> ??a0) -> 123
The annotation for let-binding was not handled correctly:
This simple PR fixed this problem so that two given functions above have the same type: