Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 21st, 2012  |  syntax: None  |  size: 1.81 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to disable SMLNJ warnings?
  2. Compiler.Control.printWarnings := false;
  3.        
  4. Control.printWarnings := false;
  5.        
  6. $ cat hello.sml
  7. print "Hello World!n";
  8. OS.Process.exit(OS.Process.success);
  9. $ sml hello.sml
  10. Standard ML of New Jersey v110.72 [built: Mon Nov 14 17:30:10 2011]
  11. [opening hello.sml]
  12. Hello World!
  13. val it = () : unit
  14. [autoloading]
  15. [library $SMLNJ-BASIS/basis.cm is stable]
  16. [autoloading done]
  17. hello.sml:2.1-2.36 Warning: type vars not generalized because of
  18.    value restriction are instantiated to dummy types (X1,X2,...)
  19.        
  20. $ cat hello.sml
  21. Control.printWarnings := false;
  22. print "Hello World!n";
  23. OS.Process.exit(OS.Process.success);
  24. $ sml hello.sml
  25. Standard ML of New Jersey v110.72 [built: Mon Nov 14 17:30:10 2011]
  26. [opening hello.sml]
  27. [autoloading]
  28. [library $smlnj/compiler/current.cm is stable]
  29. [library $smlnj/compiler/x86.cm is stable]
  30. [library $smlnj/viscomp/core.cm is stable]
  31. [library $smlnj/viscomp/basics.cm is stable]
  32. [library $smlnj/viscomp/elabdata.cm is stable]
  33. [library $smlnj/viscomp/elaborate.cm is stable]
  34. [library $SMLNJ-BASIS/basis.cm is stable]
  35. [library $smlnj/viscomp/debugprof.cm is stable]
  36. [library $SMLNJ-LIB/Util/smlnj-lib.cm is stable]
  37. [library $smlnj/MLRISC/Control.cm is stable]
  38. [library $SMLNJ-MLRISC/Control.cm is stable]
  39. [library $controls-lib.cm(=$SMLNJ-LIB/Controls)/controls-lib.cm is stable]
  40. [library $smlnj/smlnj-lib/controls-lib.cm is stable]
  41. [autoloading done]
  42. val it = () : unit
  43. Hello World!
  44. val it = () : unit
  45. [autoloading]
  46. [autoloading done]
  47.        
  48. print "Hello World!n";
  49. val _ = OS.Process.exit(OS.Process.success);
  50.        
  51. ;#set CM.Control.verbose false;
  52.        
  53. CM_VERBOSE=false sml foo.sml
  54.        
  55. val _ = print "Hello World!n";
  56. val _ = OS.Process.exit(OS.Process.success);
  57.        
  58. $ CM_VERBOSE=false sml foo.sml
  59. Standard ML of New Jersey v110.72 built: Wed May 12 15:29:00 2010]
  60. [opening foo.sml]
  61. Hello World!