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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cm/util/stdcfg.sml
ViewVC logotype

Annotation of /sml/trunk/src/cm/util/stdcfg.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1126 - (view) (download)

1 : blume 354 (*
2 :     * CM parameters that are configurable via shell-environment variables.
3 :     *
4 :     * Copyright (c) 1999 by Lucent Technologies, Bell Laboratories.
5 :     *
6 :     * author: Matthias Blume (blume@cs.princeton.edu)
7 :     *)
8 :     structure StdConfig = struct
9 :     local
10 : blume 1126 structure C = Controls
11 :    
12 :     val m = C.module { name = "Compilation Manager (CM)",
13 :     priority = [10, 2],
14 :     obscurity = 2,
15 :     prefix = "cm-",
16 :     default_suffix = SOME "-default",
17 :     mk_ename = NONE }
18 :    
19 :     fun new typespec individual = let
20 :     val r = C.registry m typespec
21 :     in
22 :     C.new r individual
23 :     end
24 :    
25 :     val bool = new C.bool
26 :     val int = new C.int
27 :     val string = new C.string
28 :     val stringoptthunk = new { tname = "string",
29 :     parse = fn s => SOME (fn () => SOME s),
30 :     show = fn th =>
31 :     (case th () of
32 :     SOME s => s
33 :     | NONE => "(not set)") }
34 : blume 354 in
35 : blume 1126 val verbose =
36 :     bool { stem = "verbose", fallback = true,
37 :     descr = "CM chattiness" }
38 :     val debug =
39 :     bool { stem = "debug", fallback = false,
40 :     descr = "CM debug mode" }
41 :     val keep_going =
42 :     bool { stem = "keep-going", fallback = false,
43 :     descr = "whether CM presses on in face of errors" }
44 :     val pathcfgspec =
45 :     string { stem = "pathconfig",
46 :     fallback = "/usr/lib/smlnj-pathconfig",
47 :     descr = "global path configuration file" }
48 :     val parse_caching =
49 :     int { stem = "parse-caching", fallback = 100,
50 :     descr = "limit on parse trees cached" }
51 : blume 369 val local_pathconfig =
52 : blume 1126 stringoptthunk { stem = "local-pathconfig",
53 :     fallback = fn () =>
54 :     Option.map (fn h => OS.Path.concat
55 :     (h, ".smlnj-pathconfig"))
56 :     (OS.Process.getEnv "HOME"),
57 :     descr = "local path configuration file" }
58 :     val warn_obsolete =
59 :     bool { stem = "warn-obsolete", fallback = true,
60 :     descr = "whether CM accepts old-style syntax" }
61 :     val conserve_memory =
62 :     bool { stem = "conserve-memory", fallback =false,
63 :     descr = "CM memory stinginess" }
64 :     val generate_index =
65 :     bool { stem = "generate-index", fallback = false,
66 :     descr = "whether CM generates library indices" }
67 : blume 354 end
68 :     end

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