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 329, Fri Jun 11 09:53:10 1999 UTC revision 331, Sat Jun 12 15:04:53 1999 UTC
# Line 19  Line 19 
19      val mkStablePath : policy -> AbsPath.t -> AbsPath.t      val mkStablePath : policy -> AbsPath.t -> AbsPath.t
20  end  end
21    
22  structure FilenamePolicy :> FILENAMEPOLICY = struct  functor FilenamePolicyFn (val cmdir : string
23                              val skeldir : string) :> FILENAMEPOLICY = struct
24    
25      type converter = AbsPath.t -> AbsPath.t      type converter = AbsPath.t -> AbsPath.t
26    
# Line 35  Line 36 
36      fun mkPolicy shift { arch, os } = let      fun mkPolicy shift { arch, os } = let
37          fun cmpath d s = let          fun cmpath d s = let
38              val { dir = d0, file = f } = AbsPath.splitDirFile s              val { dir = d0, file = f } = AbsPath.splitDirFile s
39              val d1 = AbsPath.joinDirFile { dir = d0, file = "CM" }              val d1 = AbsPath.joinDirFile { dir = d0, file = cmdir }
40              val d2 = AbsPath.joinDirFile { dir = d1, file = d }              val d2 = AbsPath.joinDirFile { dir = d1, file = d }
41          in          in
42              AbsPath.joinDirFile { dir = d2, file = f }              AbsPath.joinDirFile { dir = d2, file = f }
# Line 43  Line 44 
44          val archos = concat [arch, "-", kind2name os]          val archos = concat [arch, "-", kind2name os]
45          val archosdep = cmpath archos o shift          val archosdep = cmpath archos o shift
46      in      in
47          { skel = cmpath "SKEL", bin = archosdep, stable = archosdep }          { skel = cmpath skeldir, bin = archosdep, stable = archosdep }
48      end      end
49    
50      val colocate = mkPolicy (fn s => s)      val colocate = mkPolicy (fn s => s)
# Line 73  Line 74 
74      fun mkSkelPath (p: policy) s = #skel p s      fun mkSkelPath (p: policy) s = #skel p s
75      fun mkStablePath (p: policy) s = #stable p s      fun mkStablePath (p: policy) s = #stable p s
76  end  end
77    
78    structure FilenamePolicy =
79        FilenamePolicyFn (val cmdir = "NEWCM" val skeldir = "SKEL")

Legend:
Removed from v.329  
changed lines
  Added in v.331

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