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 586, Thu Mar 30 05:08:07 2000 UTC revision 587, Thu Mar 30 09:01:52 2000 UTC
# Line 35  Line 35 
35      val class : cm_symbol -> cm_class      val class : cm_symbol -> cm_class
36    
37      (* getting the full analysis for a group/library *)      (* getting the full analysis for a group/library *)
     val emptyGroup : pathname -> group  
38      val group :      val group :
39          pathname * privilegespec * exports option * members *          pathname * privilegespec * exports option * members *
40          GeneralParams.info * pathname option * pathname option * complainer *          GeneralParams.info * pathname option * pathname option * complainer *
# Line 57  Line 56 
56      val member :      val member :
57          GeneralParams.info * (pathname option -> pathname -> group) *          GeneralParams.info * (pathname option -> pathname -> group) *
58                               (SrcPath.context -> string -> bool)                               (SrcPath.context -> string -> bool)
59          -> { name: string, mkpath: string -> pathname,          -> { name: string,
60               group: pathname * region, class: cm_class option,               mkpath: string -> pathname,
61                 group: pathname * region,
62                 class: cm_class option,
63                 tooloptions: string list option,
64               context: SrcPath.context }               context: SrcPath.context }
65          -> members          -> members
66      val members : members * members -> members      val members : members * members -> members
# Line 144  Line 146 
146    
147      fun applyTo mc e = e mc      fun applyTo mc e = e mc
148    
     fun emptyGroup path =  
         GG.GROUP { exports = SymbolMap.empty,  
                    kind = GG.NOLIB { subgroups = [], owner = NONE },  
                    required = StringSet.empty,  
                    grouppath = path,  
                    sublibs = [] }  
   
149      fun sgl2sll subgroups = let      fun sgl2sll subgroups = let
150          fun sameSL (p, g) (p', g') = SrcPath.compare (p, p') = EQUAL          fun sameSL (p, g) (p', g') = SrcPath.compare (p, p') = EQUAL
151          fun add (x, l) =          fun add (x, l) =
152              if List.exists (sameSL x) l then l else x :: l              if List.exists (sameSL x) l then l else x :: l
153          fun oneSG (x as (_, GG.GROUP { kind, sublibs, ... }), l) =          fun oneSG (x as (_, GG.GROUP { kind, sublibs, ... }), l) =
154              case kind of              (case kind of
155                  GG.NOLIB _ => foldl add l sublibs                  GG.NOLIB _ => foldl add l sublibs
156                | _ => add (x, l)                 | _ => add (x, l))
157              | oneSG (_, l) = l
158      in      in
159          foldl oneSG [] subgroups          foldl oneSG [] subgroups
160      end      end
# Line 167  Line 163 
163          val mc = applyTo (MemberCollection.implicit init_group, curlib) m          val mc = applyTo (MemberCollection.implicit init_group, curlib) m
164          val filter = Option.map (applyTo mc) e          val filter = Option.map (applyTo mc) e
165          val pfsbn = let          val pfsbn = let
166              val GroupGraph.GROUP { exports, ... } = init_group              val { exports, ... } =
167                    case init_group of
168                        GG.GROUP x => x
169                      | GG.ERRORGROUP =>
170                        EM.impossible "semant.sml: grouplib: bad init group"
171          in          in
172              #1 (valOf (SymbolMap.find (exports, PervCoreAccess.pervStrSym)))              #1 (valOf (SymbolMap.find (exports, PervCoreAccess.pervStrSym)))
173          end          end
# Line 227  Line 227 
227                    | eq _ = false                    | eq _ = false
228              in              in
229                  if eq (curlib, owner) then ()                  if eq (curlib, owner) then ()
230                  else e0 (concat ["owner of subgroup (",                  else e0 (concat ["owner of subgroup (", libname owner,
                                  libname owner,  
231                                   ") does not match current library (",                                   ") does not match current library (",
232                                   libname curlib, ")"])                                   libname curlib, ")"])
233              end              end

Legend:
Removed from v.586  
changed lines
  Added in v.587

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