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/main/filename-policy.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/main/filename-policy.sml

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

revision 641, Thu May 11 01:16:45 2000 UTC revision 642, Thu May 11 07:30:29 2000 UTC
# Line 13  Line 13 
13      val colocate : policyMaker      val colocate : policyMaker
14      val separate : { bindir: string, bootdir: string } -> policyMaker      val separate : { bindir: string, bootdir: string } -> policyMaker
15    
16        val colocate_generic : { arch: string, os: string } -> policy
17        val separate_generic : { bindir: string, bootdir: string } ->
18                               { arch: string, os: string } -> policy
19    
20      val mkBinName : policy -> SrcPath.t -> string      val mkBinName : policy -> SrcPath.t -> string
21      val mkSkelName : policy -> SrcPath.t -> string      val mkSkelName : policy -> SrcPath.t -> string
22      val mkStableName : policy -> SrcPath.t * Version.t option -> string      val mkStableName : policy -> SrcPath.t * Version.t option -> string
# Line 45  Line 49 
49          in          in
50              OS.Path.joinDirFile { dir = d2, file = f }              OS.Path.joinDirFile { dir = d2, file = f }
51          end          end
52          val archos = concat [arch, "-", kind2name os]          val archos = concat [arch, "-", os]
53          val stable0 = cmname [archos] o shiftstable          val stable0 = cmname [archos] o shiftstable
54          val stable =          val stable =
55              if ignoreversion then stable0 o #1              if ignoreversion then stable0 o #1
# Line 64  Line 68 
68            stable = stable }            stable = stable }
69      end      end
70    
71      val colocate = mkPolicy (SrcPath.osstring, SrcPath.osstring, false)      fun ungeneric g { arch, os } = g { arch = arch, os = kind2name os }
72    
73        val colocate_generic = mkPolicy (SrcPath.osstring, SrcPath.osstring, false)
74    
75      fun separate { bindir, bootdir } = let      fun separate_generic { bindir, bootdir } = let
76          fun shiftname root p =          fun shiftname root p =
77              case SrcPath.reAnchoredName (p, root) of              case SrcPath.reAnchoredName (p, root) of
78                  SOME s => s                  SOME s => s
# Line 77  Line 83 
83          mkPolicy (shiftname bindir, shiftname bootdir, true)          mkPolicy (shiftname bindir, shiftname bootdir, true)
84      end      end
85    
86        val colocate = ungeneric colocate_generic
87        val separate = ungeneric o separate_generic
88    
89      fun mkBinName (p: policy) s = #bin p s      fun mkBinName (p: policy) s = #bin p s
90      fun mkSkelName (p: policy) s = #skel p s      fun mkSkelName (p: policy) s = #skel p s
91      fun mkStableName (p: policy) (s, v) = #stable p (s, v)      fun mkStableName (p: policy) (s, v) = #stable p (s, v)

Legend:
Removed from v.641  
changed lines
  Added in v.642

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