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

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

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

revision 631, Fri Apr 28 08:30:52 2000 UTC revision 632, Sat Apr 29 15:50:42 2000 UTC
# Line 23  Line 23 
23      val implicit : GroupGraph.group -> collection      val implicit : GroupGraph.group -> collection
24    
25      val expandOne :      val expandOne :
26          GeneralParams.info *          { gp: GeneralParams.info,
27          (SrcPath.t -> GroupGraph.group) *            rparse: SrcPath.t * Version.t option -> GroupGraph.group,
28          (SrcPath.context -> string -> bool)            load_plugin: SrcPath.context -> string -> bool }
29          -> { name: string,          -> { name: string,
30               mkpath: string -> SrcPath.t,               mkpath: string -> SrcPath.t,
31               group: SrcPath.t * region,               group: SrcPath.t * region,
# Line 54  Line 54 
54      structure E = GenericVC.Environment      structure E = GenericVC.Environment
55      structure SS = SymbolSet      structure SS = SymbolSet
56      structure GG = GroupGraph      structure GG = GroupGraph
57        structure V = Version
58    
59      type smlinfo = SmlInfo.info      type smlinfo = SmlInfo.info
60      type symbol = Symbol.symbol      type symbol = Symbol.symbol
# Line 133  Line 134 
134          end          end
135        | sequential _ = ERRORCOLLECTION        | sequential _ = ERRORCOLLECTION
136    
137      fun expandOne (gp, rparse, load_plugin) arg = let      fun expandOne { gp, rparse, load_plugin } arg = let
138          val { name, mkpath, group, class, tooloptions, context } = arg          val { name, mkpath, group, class, tooloptions, context } = arg
139          val class = Option.map (String.map Char.toLower) class          val class = Option.map (String.map Char.toLower) class
140          val error = GroupReg.error (#groupreg gp) group          val error = GroupReg.error (#groupreg gp) group
# Line 144  Line 145 
145                                    spec = (name, mkpath, class, tooloptions),                                    spec = (name, mkpath, class, tooloptions),
146                                    context = context,                                    context = context,
147                                    load_plugin = load_plugin }                                    load_plugin = load_plugin }
148          fun g_coll p =          fun g_coll (p, v) =
149              case rparse p of              case rparse (p, v) of
150                  g as GG.GROUP { exports = i, kind, required,                  g as GG.GROUP { exports = i, kind, required,
151                                  grouppath, sublibs } => let                                  grouppath, sublibs } => let
152                      val gi =                      val (gi, ver) =
153                          case kind of GG.NOLIB _ => i | _ => SymbolMap.empty                          case kind of
154                                GG.NOLIB _ => (i, NONE)
155                              | GG.LIB l => (SymbolMap.empty, #version l)
156                  in                  in
157                        case (v, ver) of
158                            (NONE, _) => ()
159                          | (SOME vrq, NONE) =>
160                            e0 "library does not carry a version stamp"
161                          | (SOME vrq, SOME ver) =>
162                            (case V.compare (vrq, ver) of
163                                 GREATER => e0 "library is older than expected"
164                               | EQUAL => ()
165                               | LESS =>
166                                 (case V.compare (V.nextMajor vrq, ver) of
167                                      GREATER =>
168                                       w0 "library is slightly newer than expected"
169                                    | _ => e0 "library is newer than expected"));
170                      COLLECTION { imports = i, gimports = gi, smlfiles = [],                      COLLECTION { imports = i, gimports = gi, smlfiles = [],
171                                   localdefs = SymbolMap.empty,                                   localdefs = SymbolMap.empty,
172                                   subgroups = [(p, g)],                                   subgroups = [(p, g)],

Legend:
Removed from v.631  
changed lines
  Added in v.632

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