SCM Repository
Annotation of /sml/trunk/src/cm/main/filename-policy.sml
Parent Directory
|
Revision Log
Revision 297 - (view) (download)
1 : | blume | 297 | (* just a placeholder so far *) |
2 : | |||
3 : | (* | ||
4 : | * A type representing different choices for file naming conventions. | ||
5 : | * | ||
6 : | * (C) 1999 Lucent Technologies, Bell Laboratories | ||
7 : | * | ||
8 : | * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp) | ||
9 : | *) | ||
10 : | signature FILENAMEPOLICY = sig | ||
11 : | |||
12 : | type policy | ||
13 : | |||
14 : | val default : policy | ||
15 : | |||
16 : | val mkBinPath : policy -> AbsPath.t -> AbsPath.t | ||
17 : | val mkSkelPath : policy -> AbsPath.t -> AbsPath.t | ||
18 : | val mkStablePath : policy -> AbsPath.t -> AbsPath.t | ||
19 : | end | ||
20 : | |||
21 : | structure FilenamePolicy :> FILENAMEPOLICY = struct | ||
22 : | |||
23 : | type policy = Dummy.t | ||
24 : | |||
25 : | val default = Dummy.v | ||
26 : | |||
27 : | fun cmpath (d, s) = let | ||
28 : | val { dir = d0, file = f } = AbsPath.splitDirFile s | ||
29 : | val d1 = AbsPath.joinDirFile { dir = d0, file = "CM" } | ||
30 : | val d2 = AbsPath.joinDirFile { dir = d1, file = d } | ||
31 : | in | ||
32 : | AbsPath.joinDirFile { dir = d2, file = f } | ||
33 : | end | ||
34 : | |||
35 : | fun mkBinPath _ s = cmpath ("bin", s) | ||
36 : | fun mkSkelPath _ s = cmpath ("SKEL", s) | ||
37 : | fun mkStablePath _ s = cmpath ("bin", s) | ||
38 : | end |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |