当我在交互环境(OCaml或utop)中执行以下命令时,所有“int”类型的表达式都变成了“int/2”类型。这种行为可以复制如下。
# 3;;
- : int = 3
# type int;;
type int
# type a;;
type a
# 3;;
- : int/2 = 3
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么会这样?谢谢!
2020 年 3 月 2 日编辑:
我发现如果我执行以下操作,“int/2”将不会出现。谁能解释一下这里发生了什么?
# 3;;
- : int = 3
# type int;;
type int
# 3;;
- : int = 3
Run Code Online (Sandbox Code Playgroud)
更新:以上情况使用了OCaml 4.08.1 版。