You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code type checks correctly in OCaml but not in MLTS. This error seems to be a problem with shadowing variable bindings. This example is based on a problem with other code from Ki Yung Ahn.
type aa =
| A
| B;;
type bb =
| C
| F of aa;;
let f x = match x with
| C -> A
| F x -> B
;;
let g x = match x with
| C -> A
| F x -> begin
let gg y = match A with
| x -> x
in gg x
end
;;
The text was updated successfully, but these errors were encountered:
I found the bug : the parser / translator doesn't deal properly with locally defined non-recursive functions. The following program works as intended :
typeaa =
| A
| B;;
typebb =
| C
| Fofaa;;
letfx=match x with|C -> A|Fx -> B
;;
letgx=match x with|C -> A|Fx -> beginletrec ggy=matchAwith|x -> x
in gg x
end
;;
The following code type checks correctly in OCaml but not in MLTS. This error seems to be a problem with shadowing variable bindings. This example is based on a problem with other code from Ki Yung Ahn.
The text was updated successfully, but these errors were encountered: