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

Diff of /sml/trunk/src/cm/tools/main/private-tools.sml

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

revision 1126, Thu Mar 7 21:16:28 2002 UTC revision 1137, Tue Mar 12 22:28:55 2002 UTC
# Line 49  Line 49 
49           { share: Sharing.request,           { share: Sharing.request,
50             setup: setup,             setup: setup,
51             split: splitting,             split: splitting,
52               noguid: bool,
53             locl: bool }             locl: bool }
54    
55      type cmparams =      type cmparams =
# Line 284  Line 285 
285          fun err s = raise ToolError { tool = tool, msg = s }          fun err s = raise ToolError { tool = tool, msg = s }
286          val kw_setup = "setup"          val kw_setup = "setup"
287          val kw_lambdasplit = "lambdasplit"          val kw_lambdasplit = "lambdasplit"
288            val kw_noguid = "noguid"
289          val UseDefault = NONE          val UseDefault = NONE
290          val Suggest = SOME          val Suggest = SOME
291          val (srq, setup, splitting) =          val (srq, setup, splitting, noguid, locl) =
292              case oto of              case oto of
293                  NONE => (Sharing.DONTCARE, (NONE, NONE), UseDefault)                  NONE => (Sharing.DONTCARE, (NONE, NONE), UseDefault,
294                             false, false)
295                | SOME to => let                | SOME to => let
296                      val { matches, restoptions } =                      val { matches, restoptions } =
297                          parseOptions { tool = tool,                          parseOptions { tool = tool,
# Line 305  Line 308 
308                            | ["shared"] => Sharing.SHARED                            | ["shared"] => Sharing.SHARED
309                            | ["private"] => Sharing.PRIVATE                            | ["private"] => Sharing.PRIVATE
310                            | _ => err "invalid option(s)"                            | _ => err "invalid option(s)"
311                      val locl =                      fun isKW kw s = String.compare (kw, s) = EQUAL
312                          case restoptions of                      val (locls, restoptions) =
313                              ["local"] => true                          List.partition (isKW "local") restoptions
314                            | [] => false                      val (noguids, restoptions) =
315                            | _ => err "invalid option(s)"                          List.partition (isKW "noguid") restoptions
316                        val locl = not (List.null locls)
317                        val noguid = not (List.null noguids)
318                        val _ = if List.null restoptions then ()
319                                else err (concat
320                                              ("invalid option(s): " ::
321                                               foldr (fn (x, l) => " " :: x :: l)
322                                                     [] restoptions))
323                      val setup =                      val setup =
324                          case matches kw_setup of                          case matches kw_setup of
325                              NONE => (NONE, NONE)                              NONE => (NONE, NONE)
# Line 351  Line 361 
361                            | _ => err "invalid lambdasplit spec"                            | _ => err "invalid lambdasplit spec"
362                      end                      end
363                  in                  in
364                      (srq, setup, splitting)                      (srq, setup, splitting, noguid, locl)
365                  end                  end
366          val p = srcpath (mkpath ())          val p = srcpath (mkpath ())
367          val sparam = { share = srq, setup = setup, split = splitting,          val sparam = { share = srq, setup = setup, split = splitting,
368                         locl = false (* FIXME *) }                         noguid = noguid,
369                           locl = locl }
370      in      in
371          ({ smlfiles = [(p, sparam)],          ({ smlfiles = [(p, sparam)],
372             sources = [(p, { class = "sml", derived = derived })],             sources = [(p, { class = "sml", derived = derived })],

Legend:
Removed from v.1126  
changed lines
  Added in v.1137

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