Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/Basics/print/printcontrol.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/Basics/print/printcontrol.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 902, Wed Aug 15 21:17:05 2001 UTC revision 1126, Thu Mar 7 21:16:28 2002 UTC
# Line 16  Line 16 
16  end  end
17    
18  structure Control_Print : PRINTCONTROL = struct  structure Control_Print : PRINTCONTROL = struct
19      val printDepth = ref 5  
20      val printLength = ref 12      val m = Controls.module { name = "compiler print settings",
21      val stringDepth = ref 70                                priority = [10, 10, 2],
22      val printLoop = ref true                                obscurity = 2,
23      val signatures = ref 2                                prefix = "print-",
24      val printOpens = ref true                                default_suffix = SOME "-default",
25                                  mk_ename = NONE }
26    
27        val flag_r = Controls.registry m Controls.bool
28    
29        val int_r = Controls.registry m Controls.int
30    
31        fun new (r, s, d, f) =
32            Controls.new_ref r { stem = s, descr = d, fallback = f }
33    
34        val printDepth = new (int_r, "depth", "max print depth", 5)
35        val printLength = new (int_r, "length", "max print length", 12)
36        val stringDepth = new (int_r, "string-depth", "max string print depth", 70)
37        val printLoop =
38            new (flag_r, "loop", "print loop", true) (* ? *)
39        val signatures =
40            new (int_r, "signatures", "max signature expansion depth", 2) (* ? *)
41        val printOpens = new (flag_r, "opens", "print `open'", true)
42      val out = ref{      val out = ref{
43                    say = fn s => TextIO.output(TextIO.stdOut,s),                    say = fn s => TextIO.output(TextIO.stdOut,s),
44                    flush = fn () => TextIO.flushOut TextIO.stdOut                    flush = fn () => TextIO.flushOut TextIO.stdOut
45                    }                    }
46      val linewidth = ref 79      val linewidth = new (int_r, "linewidth",
47                             "line-width hint for pretty printer", 79)
48      fun say s = #say (!out) s      fun say s = #say (!out) s
49      fun flush() = #flush (!out) ()      fun flush() = #flush (!out) ()
50  end  end

Legend:
Removed from v.902  
changed lines
  Added in v.1126

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0