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

Diff of /sml/trunk/src/smlnj-lib/Controls/registry.sml

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

revision 1199, Fri May 17 19:25:31 2002 UTC revision 1200, Fri May 17 19:53:41 2002 UTC
# Line 24  Line 24 
24        }        }
25    
26      and subregistry = SubReg of {      and subregistry = SubReg of {
27            prefix : string option,         (* the key for qualified registries *)
28          priority : Controls.priority,   (* control's priority *)          priority : Controls.priority,   (* control's priority *)
29          obscurity : int,                (* registry's detail level; higher means *)          obscurity : int,                (* registry's detail level; higher means *)
30                                          (* more obscure *)                                          (* more obscure *)
# Line 52  Line 53 
53    (* nest a registry inside another registry *)    (* nest a registry inside another registry *)
54      fun nest (Reg{uRegs, qRegs, ...}) {prefix, pri, obscurity, reg} = let      fun nest (Reg{uRegs, qRegs, ...}) {prefix, pri, obscurity, reg} = let
55            val subReg = SubReg{            val subReg = SubReg{
56                      prefix = prefix,
57                    priority = pri,                    priority = pri,
58                    obscurity = obscurity,                    obscurity = obscurity,
59                    reg = reg                    reg = reg
# Line 73  Line 75 
75              | find (Reg{qRegs, uRegs,...}, prefix::r) = (              | find (Reg{qRegs, uRegs,...}, prefix::r) = (
76                  case ATbl.find qRegs prefix                  case ATbl.find qRegs prefix
77                   of NONE => findInList(!uRegs, prefix::r)                   of NONE => findInList(!uRegs, prefix::r)
78                    | SOME(SubReg{reg, ...}) => (case find(reg, prefix::r)                    | SOME(SubReg{reg, ...}) => (case find(reg, r)
79                         of NONE => findInList(!uRegs, prefix::r)                         of NONE => findInList(!uRegs, prefix::r)
80                          | someCtl => someCtl                          | someCtl => someCtl
81                        (* end case *))                        (* end case *))
# Line 125  Line 127 
127                  val subregs =                  val subregs =
128                        List.foldl gather (ATbl.fold gather [] qRegs) (!uRegs)                        List.foldl gather (ATbl.fold gather [] qRegs) (!uRegs)
129                  val subregs = sortSubregs subregs                  val subregs = sortSubregs subregs
130                  fun getReg (SubReg{reg, ...}) = getTree (path, reg)                  fun getReg (SubReg{prefix=SOME prefix, reg, ...}) =
                 fun getRegi (prefix, SubReg{reg, ...}) =  
131                        getTree(prefix::path, reg)                        getTree(prefix::path, reg)
132                      | getReg (SubReg{reg, ...}) = getTree (path, reg)
133                  in                  in
134                    RTree{                    RTree{
135                        path = List.rev path,                        path = List.rev path,

Legend:
Removed from v.1199  
changed lines
  Added in v.1200

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