The MLscript programming language. Functional and object-oriented; structurally typed and sound; with powerful type inference. Soon to have full interop with TypeScript!
fun f1(a: Int, b: Int) = a + b
//│ ╔══[ERROR] Type mismatch in operator application:
//│ ║ l.17: fun f1(a: Int, b: Int) = a + b
//│ ║ ^^^^^
//│ ╟── type `()` is not an instance of type `Int`
//│ ║ l.17: fun f1(a: Int, b: Int) = a + b
//│ ║ ^^^
//│ ╟── but it flows into reference with expected type `Int`
//│ ║ l.17: fun f1(a: Int, b: Int) = a + b
//│ ╙── ^
//│ TEST CASE FAILURE: There was an unexpected type error
//│ fun f1: (a: Int | (), b: Int | ()) -> (Int | error)
Draft PR: