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 837, Fri Jun 1 17:27:54 2001 UTC revision 838, Tue Jun 5 19:10:21 2001 UTC
# Line 20  Line 20 
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 mkStableName : policy -> SrcPath.file * Version.t option -> string      val mkStableName : policy -> SrcPath.file * Version.t option -> string
23        val mkIndexName : policy -> SrcPath.file -> string
24    
25      val kind2name : SMLofNJ.SysInfo.os_kind -> string      val kind2name : SMLofNJ.SysInfo.os_kind -> string
26  end  end
27    
28  functor FilenamePolicyFn (val cmdir : string  functor FilenamePolicyFn (val cmdir : string
29                            val versiondir: Version.t -> string                            val versiondir: Version.t -> string
30                            val skeldir : string) :> FILENAMEPOLICY = struct                            val skeldir : string
31                              val indexdir : string) :> FILENAMEPOLICY = struct
32    
33      type policy = { bin: SrcPath.file -> string,      type policy = { bin: SrcPath.file -> string,
34                      skel: SrcPath.file -> string,                      skel: SrcPath.file -> string,
35                      stable: SrcPath.file * Version.t option -> string }                      stable: SrcPath.file * Version.t option -> string,
36                        index: SrcPath.file -> string }
37    
38      type policyMaker = { arch: string, os: SMLofNJ.SysInfo.os_kind } -> policy      type policyMaker = { arch: string, os: SMLofNJ.SysInfo.os_kind } -> policy
39    
# Line 65  Line 68 
68      in      in
69          { skel = cmname [skeldir] o SrcPath.osstring,          { skel = cmname [skeldir] o SrcPath.osstring,
70            bin = cmname [archos] o shiftbin,            bin = cmname [archos] o shiftbin,
71            stable = stable }            stable = stable,
72              index = cmname [indexdir] o SrcPath.osstring }
73      end      end
74    
75      fun ungeneric g { arch, os } = g { arch = arch, os = kind2name os }      fun ungeneric g { arch, os } = g { arch = arch, os = kind2name os }
# Line 92  Line 96 
96      fun mkBinName (p: policy) s = #bin p s      fun mkBinName (p: policy) s = #bin p s
97      fun mkSkelName (p: policy) s = #skel p s      fun mkSkelName (p: policy) s = #skel p s
98      fun mkStableName (p: policy) (s, v) = #stable p (s, v)      fun mkStableName (p: policy) (s, v) = #stable p (s, v)
99        fun mkIndexName (p: policy) s = #index p s
100  end  end
101    
102  structure FilenamePolicy =  structure FilenamePolicy =
103      FilenamePolicyFn (val cmdir = "CM" val skeldir = "SKEL"      FilenamePolicyFn (val cmdir = "CM"
104                          val skeldir = "SKEL"
105                          val indexdir = "INDEX"
106                        val versiondir = Version.toString)                        val versiondir = Version.toString)

Legend:
Removed from v.837  
changed lines
  Added in v.838

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