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/paths/pathconfig.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/paths/pathconfig.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 318, Mon Jun 7 09:32:09 1999 UTC revision 322, Tue Jun 8 09:36:16 1999 UTC
# Line 1  Line 1 
 (* just a placeholder so far *)  
   
1  (*  (*
2   * Configurable path anchors for new CM.   * Configurable path anchors for new CM.
3   *   *
# Line 9  Line 7 
7   *)   *)
8    
9  signature PATHCONFIG = sig  signature PATHCONFIG = sig
10    
11      type mode      type mode
12    
13      val default : mode      val hardwire : (string * string) list -> mode
14        val envcfg : (string * string EnvConfig.getterSetter) list -> mode
15    
16      val configAnchor : mode -> string -> (unit -> string) option      val configAnchor : mode -> string -> (unit -> string) option
17  end  end
# Line 22  Line 22 
22   * the directory that contains the corresponding file.   * the directory that contains the corresponding file.
23   *)   *)
24  structure PathConfig :> PATHCONFIG = struct  structure PathConfig :> PATHCONFIG = struct
     type mode = Dummy.t  
25    
26      val default = Dummy.v      type mode = string -> (unit -> string) option
27    
28        fun hardwire [] (a: string) = NONE
29          | hardwire ((a', v) :: t) a =
30            if a = a' then SOME (fn () => v) else hardwire t a
31    
32        fun envcfg [] (a: string) = NONE
33          | envcfg ((a', gs) :: t) a =
34            if a = a' then SOME (fn () => EnvConfig.getSet gs NONE)
35            else envcfg t a
36    
37      (* 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  
38  end  end

Legend:
Removed from v.318  
changed lines
  Added in v.322

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