SCM Repository
Diff of /sml/trunk/src/cm/paths/pathconfig.sml
Parent Directory
|
Revision Log
|
Patch
revision 320, Tue Jun 8 07:42:11 1999 UTC | revision 321, Tue Jun 8 08:14:28 1999 UTC | |
---|---|---|
# | Line 9 | Line 9 |
9 | *) | *) |
10 | ||
11 | signature PATHCONFIG = sig | signature PATHCONFIG = sig |
12 | ||
13 | type mode | type mode |
14 | ||
15 | val default : mode | val hardwire : (string * string) list -> mode |
16 | val envcfg : (string * string EnvConfig.getterSetter) list -> mode | |
17 | ||
18 | val configAnchor : mode -> string -> (unit -> string) option | val configAnchor : mode -> string -> (unit -> string) option |
19 | end | end |
# | Line 22 | Line 24 |
24 | * the directory that contains the corresponding file. | * the directory that contains the corresponding file. |
25 | *) | *) |
26 | structure PathConfig :> PATHCONFIG = struct | structure PathConfig :> PATHCONFIG = struct |
type mode = Dummy.t | ||
27 | ||
28 | val default = Dummy.v | type mode = string -> (unit -> string) option |
29 | ||
30 | 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 | (* this is bogus -- should not be hard-wired like this *) | fun configAnchor m s = m s |
fun configAnchor _ "smlnj-lib.cm" = | ||
SOME (fn () => "/home/blume/ML/current/lib") | ||
| configAnchor _ _ = NONE | ||
40 | end | end |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |