我正在使用MLton编译一个引用IntBinarySet的SML源文件。使用SML/NJ可以很好地运行代码,但是当使用MLton编译时,它会报告Undefined structure IntBinarySet。我需要导入smlnj-lib吗?(我可以直接在SML/NJ中使用IntBinarySet,而无需use-ing或导入任何内容)
具体地说,我的源文件intset.sml如下。
fun newSet () = IntBinarySet.emptyMLton抱怨道:
Error: intset.sml 1.17.
Undefined structure IntBinarySet.
compilation aborted: parseAndElaborate reported errors发布于 2013-05-02 04:22:24
MLton有一个很好的页面about smlnj-lib in MLton。
根据您有限的信息,我假设您不是在.mlb文件中导入smlnj-lib?
ORD_SET is part of the utility library。因此,您的问题应该被修复,引用以下内容:
$(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlbhttps://stackoverflow.com/questions/16313016
复制相似问题