src/Pure/ML-Systems/mlworks.ML
changeset 5750 7ab9dd4a8ba6
parent 5703 53b00681c63b
child 5812 cbc106ddcc83
equal deleted inserted replaced
5749:fb846bcb80ce 5750:7ab9dd4a8ba6
    17 
    17 
    18 
    18 
    19 (* MLWorks parameters *)
    19 (* MLWorks parameters *)
    20 
    20 
    21 val _ =
    21 val _ =
    22  (MLWorks.Internal.Runtime.Event.stack_overflow_handler (fn () =>
    22  (MLWorks.Internal.Runtime.Event.stack_overflow_handler 
       
    23   (fn () =>
    23     let val max_stack = MLWorks.Internal.Runtime.Memory.max_stack_blocks
    24     let val max_stack = MLWorks.Internal.Runtime.Memory.max_stack_blocks
    24     in max_stack := (! max_stack * 3) div 2 + 5 end);
    25     in max_stack := (!max_stack * 3) div 2 + 5;
       
    26        print ("#### Increasing stack to " ^ Int.toString (64 * !max_stack) ^
       
    27 	      "KB\n")
       
    28     end);
    25   MLWorks.Internal.Runtime.Memory.gc_message_level := 10;
    29   MLWorks.Internal.Runtime.Memory.gc_message_level := 10;
    26   (*Is this of any use at all?*)
    30   (*Is this of any use at all?*)
    27   Shell.Options.set (Shell.Options.ValuePrinter.showExnDetails, true));
    31   Shell.Options.set (Shell.Options.ValuePrinter.showExnDetails, true));
    28 
    32 
    29 
    33 
    33 fun exit 0 = (OS.Process.exit OS.Process.success): unit
    37 fun exit 0 = (OS.Process.exit OS.Process.success): unit
    34   | exit _ = OS.Process.exit OS.Process.failure;
    38   | exit _ = OS.Process.exit OS.Process.failure;
    35 fun quit () = exit 0;
    39 fun quit () = exit 0;
    36 
    40 
    37 (*limit the printing depth*)
    41 (*limit the printing depth*)
    38 fun print_depth n = Shell.Options.set (Shell.Options.ValuePrinter.maximumDepth, n);
    42 fun print_depth n = 
       
    43     let open Shell.Options
       
    44     in set (ValuePrinter.maximumDepth, n div 2);
       
    45        set (ValuePrinter.maximumSeqSize, n)
       
    46     end;
    39 
    47 
    40 (*interface for toplevel pretty printers, see also Pure/install_pp.ML*)
    48 (*interface for toplevel pretty printers, see also Pure/install_pp.ML*)
    41 (*n.a.*)
    49 (*n.a.*)
    42 fun make_pp path pprint = ();
    50 fun make_pp path pprint = ();
    43 fun install_pp _ = ();
    51 fun install_pp _ = ();