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 665, Fri Jun 16 04:43:57 2000 UTC revision 666, Fri Jun 16 08:27:00 2000 UTC
# Line 17  Line 17 
17      val separate_generic : { bindir: string, bootdir: string } ->      val separate_generic : { bindir: string, bootdir: string } ->
18                             { arch: string, os: string } -> policy                             { arch: string, os: string } -> policy
19    
20      val mkBinName : policy -> SrcPath.t -> string      val mkBinName : policy -> SrcPath.file -> string
21      val mkSkelName : policy -> SrcPath.t -> string      val mkSkelName : policy -> SrcPath.file -> string
22      val mkStableName : policy -> SrcPath.t * Version.t option -> string      val mkStableName : policy -> SrcPath.file * Version.t option -> string
23    
24      val kind2name : SMLofNJ.SysInfo.os_kind -> string      val kind2name : SMLofNJ.SysInfo.os_kind -> string
25  end  end
# Line 28  Line 28 
28                            val versiondir: Version.t -> string                            val versiondir: Version.t -> string
29                            val skeldir : string) :> FILENAMEPOLICY = struct                            val skeldir : string) :> FILENAMEPOLICY = struct
30    
31      type policy = { bin: SrcPath.t -> string,      type policy = { bin: SrcPath.file -> string,
32                      skel: SrcPath.t -> string,                      skel: SrcPath.file -> string,
33                      stable: SrcPath.t * Version.t option -> string }                      stable: SrcPath.file * Version.t option -> string }
34    
35      type policyMaker = { arch: string, os: SMLofNJ.SysInfo.os_kind } -> policy      type policyMaker = { arch: string, os: SMLofNJ.SysInfo.os_kind } -> policy
36    
# Line 73  Line 73 
73      val colocate_generic = mkPolicy (SrcPath.osstring, SrcPath.osstring, false)      val colocate_generic = mkPolicy (SrcPath.osstring, SrcPath.osstring, false)
74    
75      fun separate_generic { bindir, bootdir } = let      fun separate_generic { bindir, bootdir } = let
76          fun shiftname root p =          fun shiftname root p = let
77              case SrcPath.reAnchoredName (p, root) of              fun anchor a = OS.Path.concat (root, a)
78            in
79                case SrcPath.osstring_reanchored anchor p of
80                  SOME s => s                  SOME s => s
81                | NONE => (Say.say ["Failure: ", SrcPath.descr p,                | NONE => (Say.say ["Failure: ", SrcPath.descr p,
82                                    " is not an anchored path!\n"];                                    " is not an anchored path!\n"];
83                           raise Fail "bad path")                           raise Fail "bad path")
84            end
85      in      in
86          mkPolicy (shiftname bindir, shiftname bootdir, true)          mkPolicy (shiftname bindir, shiftname bootdir, true)
87      end      end

Legend:
Removed from v.665  
changed lines
  Added in v.666

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