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/semant/members.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/semant/members.sml

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

revision 268, Mon May 10 07:00:02 1999 UTC revision 269, Mon May 10 13:34:43 1999 UTC
# Line 13  Line 13 
13   *)   *)
14  signature MEMBERCOLLECTION = sig  signature MEMBERCOLLECTION = sig
15    
16        type symbol = GenericVC.Symbol.symbol
17        type smlinfo = DependencyGraph.smlinfo
18    
19        exception DuplicateImport of symbol * smlinfo * smlinfo
20        exception DuplicateDefinition of symbol * smlinfo * smlinfo
21    
22      type collection      type collection
23    
24      val expandOne : AbsPath.t * string option -> collection      val expandOne : AbsPath.t * string option -> collection
# Line 25  Line 31 
31    
32  structure MemberCollection :> MEMBERCOLLECTION = struct  structure MemberCollection :> MEMBERCOLLECTION = struct
33    
34      type collection = unit      structure DG = DependencyGraph
35    
36      fun expandOne (f: AbsPath.t, c: string option) = ()      type smlinfo = DG.smlinfo
37      fun sequential (c1: collection, c2: collection) = ()      type symbol = GenericVC.Symbol.symbol
38    
39        exception DuplicateImport of symbol * smlinfo * smlinfo
40        exception DuplicateDefinition of symbol * smlinfo * smlinfo
41    
42        datatype collection =
43            COLLECTION of { subexports: DG.farnode SymbolMap.map,
44                            smlfiles: smlinfo list,
45                            localdefs: smlinfo SymbolMap.map }
46    
47        fun expandOne (f: AbsPath.t, c: string option) = raise Fail "notyet"
48    
49        fun sequential (COLLECTION c1, COLLECTION c2) = let
50            fun se_error (s, (_, DG.NODE n1), (_, DG.NODE n2)) =
51                raise DuplicateImport (s, #smlinfo n1, #smlinfo n2)
52            fun ld_error (s, f1, f2) = raise DuplicateDefinition (s, f1, f2)
53            val se_union = SymbolMap.unionWithi se_error
54            val ld_union = SymbolMap.unionWithi ld_error
55        in
56            COLLECTION { subexports = se_union (#subexports c1, #subexports c2),
57                         smlfiles = #smlfiles c1 @ #smlfiles c2,
58                         localdefs = ld_union (#localdefs c1, #localdefs c2) }
59        end
60    
61      fun num_look (c: collection) (s: string) = 0      fun num_look (c: collection) (s: string) = 0
62      fun ml_look (c: collection) (s: GenericVC.Symbol.symbol) = false  
63      fun cm_look (c: collection) (s: string) = false      fun cm_look (c: collection) (s: string) = false
64    
65        fun ml_look (COLLECTION { subexports, localdefs, ... }) s =
66            isSome (SymbolMap.find (subexports, s)) orelse
67            isSome (SymbolMap.find (localdefs, s))
68  end  end

Legend:
Removed from v.268  
changed lines
  Added in v.269

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