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 1145, Fri Mar 15 02:30:53 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.registry { 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.group m Controls.bool
28    
29        val int_r = Controls.group m Controls.int
30    
31        fun new (r, s, d, f) = Controls.new r { stem = s, descr = d, fallback = f }
32    
33        val printDepth = new (int_r, "depth", "max print depth", 5)
34        val printLength = new (int_r, "length", "max print length", 12)
35        val stringDepth = new (int_r, "string-depth", "max string print depth", 70)
36        val printLoop =
37            new (flag_r, "loop", "print loop", true) (* ? *)
38        val signatures =
39            new (int_r, "signatures", "max signature expansion depth", 2) (* ? *)
40        val printOpens = new (flag_r, "opens", "print `open'", true)
41      val out = ref{      val out = ref{
42                    say = fn s => TextIO.output(TextIO.stdOut,s),                    say = fn s => TextIO.output(TextIO.stdOut,s),
43                    flush = fn () => TextIO.flushOut TextIO.stdOut                    flush = fn () => TextIO.flushOut TextIO.stdOut
44                    }                    }
45      val linewidth = ref 79      val linewidth = new (int_r, "linewidth",
46                             "line-width hint for pretty printer", 79)
47      fun say s = #say (!out) s      fun say s = #say (!out) s
48      fun flush() = #flush (!out) ()      fun flush() = #flush (!out) ()
49  end  end

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

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