3

我正在使用 Linux Mint 17,我最近使用 apt-get 为 Emacs 安装了 smlnj(标准 ML of New Jersey)和 sml-mode。

当我尝试使用命令增加打印深度时, Control.Print.PrintDepth := 100;出现以下错误:

- Control.Print.PrintDepth := 100;
[autoloading]
[library $smlnj/compiler/current.cm is stable]
[library $smlnj/compiler/x86.cm is stable]
[library $smlnj/viscomp/core.cm is stable]
[library $smlnj/viscomp/basics.cm is stable]
[library $smlnj/viscomp/elabdata.cm is stable]
[library $smlnj/viscomp/elaborate.cm is stable]
[library $SMLNJ-BASIS/basis.cm is stable]
[library $smlnj/viscomp/debugprof.cm is stable]
 Error: (stable) $smlnj/smlnj-lib/smlnj-lib.cm: unable to find $SMLNJ-LIB/Util/smlnj-lib.cm (/build/buildd/smlnj-110.76/sml.boot.x86-unix/SMLNJ-LIB/Util/smlnj-lib.cm)

unexpected exception (bug?) in SML/NJ: Format [Format]
  raised at: ../cm/stable/stabilize.sml:257.15-257.21
         ../cm/stable/stabilize.sml:360.44
         ../compiler/TopLevel/interact/evalloop.sml:44.55

我用谷歌搜索了它,但没有找到任何东西。有没有人知道这个错误可能意味着什么以及如何解决它?

编辑:我也按照 Gergely 的建议尝试了带有小 p 的命令,但没有任何区别。我仍然得到相同的输出:

- Control.Print.printDepth := 100;
[autoloading]
[library $smlnj/compiler/current.cm is stable]
... 
[library $smlnj/viscomp/debugprof.cm is stable]
 Error: (stable) $smlnj/smlnj-lib/smlnj-lib.cm: unable to find $SMLNJ-LIB/Util/smlnj-lib.cm (/build/buildd/smlnj-110.76/sml.boot.x86-unix/SMLNJ-LIB/Util/smlnj-lib.cm)

unexpected exception (bug?) in SML/NJ: Format [Format]
  raised at: ../cm/stable/stabilize.sml:257.15-257.21
             ../cm/stable/stabilize.sml:360.44
             ../compiler/TopLevel/interact/evalloop.sml:44.55

如果我open Control.Print;像 Gergely 那样输入 REPL,我也会得到同样的错误。

我也尝试从源代码构建 smlnj,但 Emacs 无法识别它 - 当我尝试使用 Emacs 键盘快捷键将 .sml 文件加载到 REPL 时C-c C-l,它抱怨它找不到 sml 命令。

谢谢,斯佩拉

4

2 回答 2

3

解决了。我需要安装libsmlnj-smlnjapt-get 也提供的附加软件包。它解决了我的问题。

谢谢你的帮助,斯佩拉。

于 2014-11-20T20:46:24.253 回答
0

我没有 Linux Mint 但尝试打开结构Control.Print

- open Control.Print;
opening Control.Print
  val printDepth : int ref
  val printLength : int ref
  val stringDepth : int ref
  val intinfDepth : int ref
  val printLoop : bool ref
  val signatures : int ref
  val printOpens : bool ref
  val out : {flush:unit -> unit, say:string -> unit} ref
  val linewidth : int ref
  val say : string -> unit
  val flush : unit -> unit

如您所见,所寻找的函数名称是printDepth,带有小 p。

我安装了最新的 SML/NJ,版本 110.77。花了五分钟,我建议从源代码构建它:

http://smlnj.org/dist/working/110.77/NOTES/INSTALL

第 1 节。

于 2014-11-20T13:38:12.870 回答