SML format fix
I am using Linux Mint 17 and I recently installed smlnj (Standard ML of New Jersey) and sml-mode for Emacs with apt-get.
When I try to increase the print depth using the command
Control.Print.PrintDepth := 100;
I get the following error:
- 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
I googled but couldn't find anything. Does anyone know what this error might mean and how to fix it?
EDIT: I also tried the command with a small p as Gergi suggested, but it didn't make any difference. I still get the same result:
- 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
I also get the same error if I type open Control.Print;
in the REPL like Gergy did.
I also tried to build smlnj from source, but Emacs doesn't recognize it - when I try to load the .sml file in the REPL with the Emacs keyboard shortcut C-c C-l
, it complains that it can't find the sml command.
Thanks, Ε pela
source to share
I don't have Linux Mint, but try opening the structure 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
as you can see, the desired function name printDepth
, with a small p.
I have installed the latest SML / NJ, version 110.77. It took five minutes, I recommend building it from source:
http://smlnj.org/dist/working/110.77/NOTES/INSTALL
section 1.
source to share