【发布时间】:2018-02-17 19:38:00
【问题描述】:
我试图使用Int32 库编写一些代码,但我遇到了类型错误:
let x : int = 7;
Int32.abs(x)
This has type:
int
But somewhere wanted:
int32
对此我有点惊讶,因为在其他语言中int 只是int32 的别名。
我的问题是:
- Reason ML 中可用的整数类型有哪些?
- 使用它们的准则是什么?
- 每个都有一个模块吗? (例如,我注意到有
Int32.abs,但没有Int.abs)
【问题讨论】:
标签: integer ocaml reason reasonml