Confusing type error message
The following code
let g = if true then 1
produces the error
This expression has type (), but is expected to have type int
while one could except the opposite as OCaml does:
Error: This expression has type int but an expression was expected of type
unit because it is in the result of a conditional with no else branch