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/smlnj-lib/Controls/registry-sig.sml
ViewVC logotype

Annotation of /sml/trunk/src/smlnj-lib/Controls/registry-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1193 - (view) (download)

1 : jhr 1193 (* registry-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4 :     *
5 :     * A registry collects together string controls; it supports generation
6 :     * of help messages and initialization from the environment.
7 :     *)
8 :    
9 :     signature CONTROL_REGISTRY =
10 :     sig
11 :    
12 :     type registry
13 :    
14 :     val new : {
15 :     help : string (* registry's description *)
16 :     } -> registry
17 :    
18 :     (* register a control *)
19 :     val register : registry -> {
20 :     ctl : string Controls.control,
21 :     envName : string option
22 :     } -> unit
23 :    
24 :     (* register a set of controls *)
25 :     val registerSet : registry -> {
26 :     ctls : (string, 'a) ControlSet.control_set,
27 :     mkEnvName : string -> string option
28 :     } -> unit
29 :    
30 :     (* nest a registry inside another registry *)
31 :     val nest : registry -> {
32 :     prefix : string option,
33 :     pri : Controls.priority, (* registry's priority *)
34 :     obscurity : int, (* registry's detail level; higher means *)
35 :     (* more obscure *)
36 :     reg : registry
37 :     } -> unit
38 :    
39 :     (* find a control *)
40 :     val control : registry -> string list -> string Controls.control option
41 :    
42 :     (* initialize the controls in the registry from the environment *)
43 :     val init : registry -> unit
44 :    
45 :     datatype registry_tree = RTree of {
46 :     help : string,
47 :     ctls : string Controls.control list,
48 :     subregs : registry_tree list
49 :     }
50 :    
51 :     val controls : (registry * int option) -> registry_tree
52 :    
53 :     end

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