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 444, Thu Sep 16 05:32:14 1999 UTC revision 493, Mon Nov 29 07:13:22 1999 UTC
# Line 21  Line 21 
21      val empty : collection      val empty : collection
22    
23      val expandOne : GeneralParams.info * (SrcPath.t -> GroupGraph.group)      val expandOne : GeneralParams.info * (SrcPath.t -> GroupGraph.group)
24          -> { sourcepath: SrcPath.t, group: SrcPath.t * region,          -> { name: string, mkpath: string -> SrcPath.t,
25               class: string option }               group: SrcPath.t * region, class: string option,
26                 context: SrcPath.context }
27          -> collection          -> collection
28      val sequential : collection * collection * (string -> unit) -> collection      val sequential : collection * collection * (string -> unit) -> collection
29    
# Line 105  Line 106 
106    
107      fun expandOne (gp, rparse) arg = let      fun expandOne (gp, rparse) arg = let
108          val primconf = #primconf (#param gp)          val primconf = #primconf (#param gp)
109          val { sourcepath, group, class } = arg          val { name, mkpath, group, class, context } = arg
110          val class = Option.map (String.map Char.toLower) class          val class = Option.map (String.map Char.toLower) class
111          val error = GroupReg.error (#groupreg gp) group          val error = GroupReg.error (#groupreg gp) group
112          fun noPrimitive () = let          fun noPrimitive () = let
113              fun e0 s = error EM.COMPLAIN s EM.nullErrorBody              fun e0 s = error EM.COMPLAIN s EM.nullErrorBody
114              fun w0 s = error EM.WARN s EM.nullErrorBody              fun w0 s = error EM.WARN s EM.nullErrorBody
115              val expansions = PrivateTools.expand e0 (sourcepath, class)              val { smlfiles, cmfiles } =
116              fun exp2coll (PrivateTools.GROUP p) = let                  PrivateTools.expand { error = e0,
117                                          spec = (name, mkpath, class),
118                                          context = context }
119                fun g_coll p = let
120                      val g as GG.GROUP { exports = i, kind, required, ... } =                      val g as GG.GROUP { exports = i, kind, required, ... } =
121                          rparse p                          rparse p
122                      val gi = case kind of GG.NOLIB => i | _ => SymbolMap.empty                      val gi = case kind of GG.NOLIB => i | _ => SymbolMap.empty
# Line 122  Line 126 
126                                   subgroups = [(p, g)],                                   subgroups = [(p, g)],
127                                   reqpriv = required }                                   reqpriv = required }
128                  end                  end
129                | exp2coll (PrivateTools.SMLSOURCE src) = let              fun s_coll (p, s) = let
                     val { sourcepath = p, history = h, sh_spec = s } = src  
130                      val i = SmlInfo.info gp                      val i = SmlInfo.info gp
131                          { sourcepath = p,                      { sourcepath = p, group = group,
132                            group = group,                        sh_spec = s, split = true }
                           sh_spec = s,  
                           split = true }  
133                      val exports =                      val exports =
134                          case SmlInfo.exports gp i of                          case SmlInfo.exports gp i of
135                              NONE => SS.empty                              NONE => SS.empty
# Line 147  Line 148 
148                                   subgroups = [],                                   subgroups = [],
149                                   reqpriv = StringSet.empty }                                   reqpriv = StringSet.empty }
150                  end                  end
151              val collections = map exp2coll expansions              val collections = map g_coll cmfiles @ map s_coll smlfiles
152              fun combine (c1, c2) = sequential (c2, c1, e0)              fun combine (c1, c2) = sequential (c2, c1, e0)
153          in          in
154              foldl combine empty collections              foldl combine empty collections
155          end          end
156      in      in
157          if isSome class then noPrimitive ()          if isSome class then noPrimitive ()
158          else case Primitive.fromString primconf (SrcPath.specOf sourcepath) of          else case Primitive.fromString primconf name of
159              SOME p => let              SOME p => let
160                  val exports = Primitive.exports primconf p                  val exports = Primitive.exports primconf p
161                  val env = Primitive.da_env primconf p                  val env = Primitive.da_env primconf p

Legend:
Removed from v.444  
changed lines
  Added in v.493

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