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/cm/semant/semant.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/semant/semant.sml

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

revision 1497, Mon May 24 15:59:53 2004 UTC revision 1498, Tue May 25 20:59:00 2004 UTC
# Line 48  Line 48 
48                    members: members,                    members: members,
49                    gp: GeneralParams.info,                    gp: GeneralParams.info,
50                    curlib: SrcPath.file option,                    curlib: SrcPath.file option,
                   owner: SrcPath.file option,  
51                    initgroup: group } -> group                    initgroup: group } -> group
52    
53      val library : { path: SrcPath.file,      val library : { path: SrcPath.file,
# Line 246  Line 245 
245    
246      fun group arg = let      fun group arg = let
247          val { path = g, privileges = p, exports = e, members = m,          val { path = g, privileges = p, exports = e, members = m,
248                gp, curlib, owner, initgroup } = arg                gp, curlib, initgroup } = arg
249          val mc = applyTo (MC.implicit gp initgroup, curlib) m          val mc = applyTo (MC.implicit gp initgroup, curlib) m
250          val filter = getExports (mc, e)          val filter = getExports (mc, e)
251          val pfsbn = let          val pfsbn = let
# Line 267  Line 266 
266          if StringSet.isEmpty wr then ()          if StringSet.isEmpty wr then ()
267          else EM.impossible "group with wrapped privileges";          else EM.impossible "group with wrapped privileges";
268          GG.GROUP { exports = exports,          GG.GROUP { exports = exports,
269                     kind = GG.NOLIB { subgroups = subgroups, owner = owner },                     kind = GG.NOLIB { subgroups = subgroups,
270                                         owner = curlib },
271                     required = rp' \/ rp \/ wr,                     required = rp' \/ rp \/ wr,
272                     grouppath = g,                     grouppath = g,
273                     sources = MC.sources mc,                     sources = MC.sources mc,
# Line 330  Line 330 
330          val group = #group arg          val group = #group arg
331          val error = GroupReg.error (#groupreg gp) group          val error = GroupReg.error (#groupreg gp) group
332          fun e0 s = error EM.COMPLAIN s EM.nullErrorBody          fun e0 s = error EM.COMPLAIN s EM.nullErrorBody
         fun checkowner (_, GG.GROUP { kind = GG.NOLIB { owner, ... }, ...},  
                         _) =  
             let fun libname NONE = "<toplevel>"  
                   | libname (SOME p) = SrcPath.descr p  
                 fun eq (NONE, NONE) = true  
                   | eq (SOME p, SOME p') = SrcPath.compare (p, p') = EQUAL  
                   | eq _ = false  
333              in              in
                 if eq (curlib, owner) then ()  
                 else e0 (concat ["owner of subgroup (", libname owner,  
                                  ") does not match current library (",  
                                  libname curlib, ")"])  
             end  
           | checkowner _ = ()  
     in  
         app checkowner (MC.subgroups coll);  
334          MC.sequential (env, coll, e0)          MC.sequential (env, coll, e0)
335      end      end
336      fun members (m1, m2) (env, curlib) = m2 (m1 (env, curlib), curlib)      fun members (m1, m2) (env, curlib) = m2 (m1 (env, curlib), curlib)

Legend:
Removed from v.1497  
changed lines
  Added in v.1498

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