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

Diff of /sml/trunk/src/cm/tools/tools.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 45  Line 45 
45      (* The goal of applying tools to members is to obtain an "expansion",      (* The goal of applying tools to members is to obtain an "expansion",
46       * i.e., a list of ML-files and a list of .cm-files. *)       * i.e., a list of ML-files and a list of .cm-files. *)
47      type expansion = { smlfiles: (srcpath * Sharing.request) list,      type expansion = { smlfiles: (srcpath * Sharing.request) list,
48                         cmfiles: srcpath list }                         cmfiles: (srcpath * Version.t option) list }
49    
50      (* A partial expansion is an expansion with a list of things yet to be      (* A partial expansion is an expansion with a list of things yet to be
51       * expanded... *)       * expanded... *)
# Line 164  Line 164 
164      type spec = string * pathmaker * class option * toolopts option      type spec = string * pathmaker * class option * toolopts option
165    
166      type expansion = { smlfiles: (srcpath * Sharing.request) list,      type expansion = { smlfiles: (srcpath * Sharing.request) list,
167                         cmfiles: srcpath list }                         cmfiles: (srcpath * Version.t option) list }
168    
169      type partial_expansion = expansion * spec list      type partial_expansion = expansion * spec list
170    
# Line 271  Line 271 
271      in      in
272          ({ smlfiles = [(mkpath name, srq)], cmfiles = [] }, [])          ({ smlfiles = [(mkpath name, srq)], cmfiles = [] }, [])
273      end      end
274      fun cmrule { spec = (name, mkpath, _, NONE), context, mkNativePath } =      fun cmrule { spec = (name, mkpath, _, oto), context, mkNativePath } =
275          ({ smlfiles = [], cmfiles = [mkpath name] }, [])          let fun err m = raise ToolError { tool = "cm", msg = m }
276        | cmrule _ = raise ToolError { tool = "cm",              val vrq =
277                                       msg = "superfluous option specified" }                  case oto of
278                        NONE => NONE
279                      | SOME [] => NONE
280                      | SOME [SUBOPTS { name = "version",
281                                        opts = [STRING { name, ... }] }] =>
282                        (case Version.fromString name of
283                             NONE => err "ill-formed version specification"
284                           | SOME v => SOME v)
285                      | _ => err "unknown option"
286            in
287                ({ smlfiles = [], cmfiles = [(mkpath name, vrq)] }, [])
288            end
289    
290      fun expand { error, spec, context, load_plugin } = let      fun expand { error, spec, context, load_plugin } = let
291          fun mkNativePath s = SrcPath.native { context = context, spec = s }          fun mkNativePath s = SrcPath.native { context = context, spec = s }

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