【发布时间】:2019-09-21 12:17:42
【问题描述】:
代码:
let size = 10
let getTbl = Array.init size ~f:(fun _ -> Avltree.empty )
end
错误:
Error: The type of this module,
sig val size : int val getTbl : ('_weak1, '_weak2) Avltree.t array end,
contains type variables that cannot be generalized
如何让 Ocaml 编译器知道我打算将键和值都存储为整数?
尝试了几种不同的方法,但都没有奏效。
【问题讨论】:
标签: ocaml