- How to disable SMLNJ warnings?
- Compiler.Control.printWarnings := false;
- Control.printWarnings := false;
- $ cat hello.sml
- print "Hello World!n";
- OS.Process.exit(OS.Process.success);
- $ sml hello.sml
- Standard ML of New Jersey v110.72 [built: Mon Nov 14 17:30:10 2011]
- [opening hello.sml]
- Hello World!
- val it = () : unit
- [autoloading]
- [library $SMLNJ-BASIS/basis.cm is stable]
- [autoloading done]
- hello.sml:2.1-2.36 Warning: type vars not generalized because of
- value restriction are instantiated to dummy types (X1,X2,...)
- $ cat hello.sml
- Control.printWarnings := false;
- print "Hello World!n";
- OS.Process.exit(OS.Process.success);
- $ sml hello.sml
- Standard ML of New Jersey v110.72 [built: Mon Nov 14 17:30:10 2011]
- [opening hello.sml]
- [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]
- [library $SMLNJ-LIB/Util/smlnj-lib.cm is stable]
- [library $smlnj/MLRISC/Control.cm is stable]
- [library $SMLNJ-MLRISC/Control.cm is stable]
- [library $controls-lib.cm(=$SMLNJ-LIB/Controls)/controls-lib.cm is stable]
- [library $smlnj/smlnj-lib/controls-lib.cm is stable]
- [autoloading done]
- val it = () : unit
- Hello World!
- val it = () : unit
- [autoloading]
- [autoloading done]
- print "Hello World!n";
- val _ = OS.Process.exit(OS.Process.success);
- ;#set CM.Control.verbose false;
- CM_VERBOSE=false sml foo.sml
- val _ = print "Hello World!n";
- val _ = OS.Process.exit(OS.Process.success);
- $ CM_VERBOSE=false sml foo.sml
- Standard ML of New Jersey v110.72 built: Wed May 12 15:29:00 2010]
- [opening foo.sml]
- Hello World!