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 1136, Tue Mar 12 19:44:02 2002 UTC revision 1137, Tue Mar 12 22:28:55 2002 UTC
# Line 19  Line 19 
19    
20      val mkBinName : policy -> SrcPath.file -> string      val mkBinName : policy -> SrcPath.file -> string
21      val mkSkelName : policy -> SrcPath.file -> string      val mkSkelName : policy -> SrcPath.file -> string
22      val mkIdCacheName : policy -> SrcPath.file -> { file: string, key: string }      val mkGUidName : policy -> SrcPath.file -> string
23      val mkStableName : policy -> SrcPath.file * Version.t option -> string      val mkStableName : policy -> SrcPath.file * Version.t option -> string
24      val mkIndexName : policy -> SrcPath.file -> string      val mkIndexName : policy -> SrcPath.file -> string
25    
# Line 29  Line 29 
29  functor FilenamePolicyFn (val cmdir : string  functor FilenamePolicyFn (val cmdir : string
30                            val versiondir: Version.t -> string                            val versiondir: Version.t -> string
31                            val skeldir : string                            val skeldir : string
32                              val guiddir : string
33                            val icprefix : string                            val icprefix : string
34                            val indexdir : string) :> FILENAMEPOLICY = struct                            val indexdir : string) :> FILENAMEPOLICY = struct
35    
36      type policy = { bin: SrcPath.file -> string,      type policy = { bin: SrcPath.file -> string,
37                      skel: SrcPath.file -> string,                      skel: SrcPath.file -> string,
38                      id_cache: SrcPath.file -> { file: string, key: string },                      guid: SrcPath.file -> string,
39                      stable: SrcPath.file * Version.t option -> string,                      stable: SrcPath.file * Version.t option -> string,
40                      index: SrcPath.file -> string }                      index: SrcPath.file -> string }
41    
# Line 69  Line 70 
70                       in                       in
71                           if exists then try else stable0 s                           if exists then try else stable0 s
72                       end)                       end)
         fun id_cache src = let  
             val s = SrcPath.osstring src  
             val { dir = d0, file = key } = OS.Path.splitDirFile s  
             val file = foldl subDir d0 [cmdir, archosidcache]  
         in  
             { file = file, key = key }  
         end  
73      in      in
74          { skel = cmname [skeldir] o SrcPath.osstring,          { skel = cmname [skeldir] o SrcPath.osstring,
75              guid = cmname [guiddir] o SrcPath.osstring,
76            bin = cmname [archos] o shiftbin,            bin = cmname [archos] o shiftbin,
           id_cache = id_cache,  
77            stable = stable,            stable = stable,
78            index = cmname [indexdir] o SrcPath.osstring }            index = cmname [indexdir] o SrcPath.osstring }
79      end      end
# Line 108  Line 102 
102    
103      fun mkBinName (p: policy) s = #bin p s      fun mkBinName (p: policy) s = #bin p s
104      fun mkSkelName (p: policy) s = #skel p s      fun mkSkelName (p: policy) s = #skel p s
105      fun mkIdCacheName (p: policy) s = #id_cache p s      fun mkGUidName (p: policy) s = #guid p s
106      fun mkStableName (p: policy) (s, v) = #stable p (s, v)      fun mkStableName (p: policy) (s, v) = #stable p (s, v)
107      fun mkIndexName (p: policy) s = #index p s      fun mkIndexName (p: policy) s = #index p s
108  end  end
# Line 116  Line 110 
110  structure FilenamePolicy =  structure FilenamePolicy =
111      FilenamePolicyFn (val cmdir = "CM"      FilenamePolicyFn (val cmdir = "CM"
112                        val skeldir = "SKEL"                        val skeldir = "SKEL"
113                          val guiddir = "GUID"
114                        val icprefix = "IC"                        val icprefix = "IC"
115                        val indexdir = "INDEX"                        val indexdir = "INDEX"
116                        val versiondir = Version.toString)                        val versiondir = Version.toString)

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

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