SCM Repository
Annotation of /sml/trunk/src/cm/paths/pathconfig.sml
Parent Directory
|
Revision Log
Revision 321 - (view) (download)
1 : | blume | 265 | (* just a placeholder so far *) |
2 : | |||
3 : | blume | 267 | (* |
4 : | * Configurable path anchors for new CM. | ||
5 : | * | ||
6 : | * (C) 1999 Lucent Technologies, Bell Laboratories | ||
7 : | * | ||
8 : | * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp) | ||
9 : | *) | ||
10 : | |||
11 : | blume | 265 | signature PATHCONFIG = sig |
12 : | blume | 321 | |
13 : | blume | 318 | type mode |
14 : | |||
15 : | blume | 321 | val hardwire : (string * string) list -> mode |
16 : | val envcfg : (string * string EnvConfig.getterSetter) list -> mode | ||
17 : | blume | 318 | |
18 : | val configAnchor : mode -> string -> (unit -> string) option | ||
19 : | blume | 265 | end |
20 : | |||
21 : | blume | 309 | (* |
22 : | * The names of config anchors must be names of actual files. | ||
23 : | * Function configAnchor will map the name of the anchor to | ||
24 : | * the directory that contains the corresponding file. | ||
25 : | *) | ||
26 : | blume | 265 | structure PathConfig :> PATHCONFIG = struct |
27 : | blume | 318 | |
28 : | blume | 321 | type mode = string -> (unit -> string) option |
29 : | blume | 318 | |
30 : | blume | 321 | fun hardwire [] (a: string) = NONE |
31 : | | hardwire ((a', v) :: t) a = | ||
32 : | if a = a' then SOME (fn () => v) else hardwire t a | ||
33 : | |||
34 : | fun envcfg [] (a: string) = NONE | ||
35 : | | envcfg ((a', gs) :: t) a = | ||
36 : | if a = a' then SOME (fn () => EnvConfig.getSet gs NONE) | ||
37 : | else envcfg t a | ||
38 : | |||
39 : | fun configAnchor m s = m s | ||
40 : | blume | 265 | end |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |