Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cm/stable/stabmm.sml
ViewVC logotype

Annotation of /sml/trunk/src/cm/stable/stabmm.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 879 - (view) (download)

1 : blume 879 (* stabmm.sml
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *
5 :     * author: Matthias Blume (blume@research.bell-lab.com)
6 :     *)
7 : blume 588 local
8 : blume 879 structure SE = StaticEnv
9 :     structure MI = ModuleId
10 : blume 588 in
11 : blume 879 (* This module implements a "central" modmap for stable libraries.
12 :     * By having only one such map, sharing should be maximized. *)
13 : blume 588 signature STAB_MODMAP = sig
14 :     val get : unit -> MI.tmap
15 :     val reset : unit -> unit
16 :     val addEnv : SE.staticEnv -> MI.tmap
17 :     end
18 :    
19 :     functor StabModmapFn () :> STAB_MODMAP = struct
20 :    
21 :     val mm = ref MI.emptyTmap
22 :    
23 :     fun reset () = mm := MI.emptyTmap
24 :     fun get () = !mm
25 :    
26 :     fun addEnv se = let
27 :     val m = GenModIdMap.mkMap' (se, !mm)
28 :     in
29 :     mm := m; m
30 :     end
31 :     end
32 :     end

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