The structure Compiler.Control.Print controls some aspects of interaction with SML interpreter. It contains the following declarations: val printLength = ref 12 : int ref (* how much of long lists to print *) val printDepth = ref 5 : int ref (* how much of deeply nested structures *) val stringDepth = ref 70 : int ref (* how much of a long string to print *) Change the value of printLength, if it is desired to see more of the elements of a long list. Change the value of printDepth to print more of deeply nested data structures. For example, - val l = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; val l = [1,2,3,4,5,6,7,8,9,10,11,12,...] : int list - l; val it = [1,2,3,4,5,6,7,8,9,10,11,12,...] : int list - Compiler.Control.Print.printLength := 20; val it = () : unit - l; val it = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] : int list - datatype tree = leaf | node of int * tree * tree; datatype tree = leaf | node of int * tree * tree - val t = node (1, node (2, node (3, leaf, leaf), leaf), leaf); val t = node (1,node (2,node #,leaf),leaf) : tree - Compiler.Control.Print.printDepth := 6; val it = () : unit - t; val it = node (1,node (2,node (#,#,#),leaf),leaf) : tree - Compiler.Control.Print.printDepth := 7; val it = () : unit - t; val it = node (1,node (2,node (3,leaf,leaf),leaf),leaf) : tree - Compiler.Control.Print.stringDepth := 9; val it = () : unit - "elide, omit, abridge, curtail"; val it = "elide, om#" : string Also in the structure Compiler.Control.Print, the variable out is declared: (* where compiler messages are sent *) val out : {say : string -> unit, flush : unit -> unit} ref To surpress the SML-NJ prompt and response, use the following assignment. Compiler.Control.Print.out := {say=fn _=>(), flush=fn()=>()}; Prompts The structure Complier.Control contains the following variables: val primaryPrompt = ref "- " : string ref val secondaryPrompt = ref "= " : string ref To change the primary prompt, for example, type: Compiler.Control.primaryPrompt := "ML> "; ******************* NB! NB! NB! ************************** In newer versions of SML/NJ, the Control structure is placed at the top level and not under Compiler. Consequently, instead of writing - Compiler.Control.Print.printLength := 20; etc., one drops the initial Compiler and writes - Control.Print.printLength := 20;