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

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

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

revision 268, Mon May 10 07:00:02 1999 UTC revision 274, Fri May 14 05:23:02 1999 UTC
# Line 10  Line 10 
10      exception ExplicitError of string      exception ExplicitError of string
11      exception ExpressionError of exn      exception ExpressionError of exn
12    
13        type context = AbsPath.context
14      type pathname = AbsPath.t      type pathname = AbsPath.t
15      type ml_symbol      type ml_symbol
16      type cm_symbol      type cm_symbol
# Line 25  Line 26 
26      type complainer = string -> unit      type complainer = string -> unit
27    
28      (* getting elements of primitive types (pathnames and symbols) *)      (* getting elements of primitive types (pathnames and symbols) *)
29      val file_native : string * pathname -> pathname      val file_native : string * context -> pathname
30      val file_standard : string * pathname -> pathname      val file_standard : string * context -> pathname
31      val cm_symbol : string -> cm_symbol      val cm_symbol : string -> cm_symbol
32      val ml_structure : string -> ml_symbol      val ml_structure : string -> ml_symbol
33      val ml_signature : string -> ml_symbol      val ml_signature : string -> ml_symbol
34      val ml_functor : string -> ml_symbol      val ml_functor : string -> ml_symbol
35      val ml_funsig : string -> ml_symbol      val ml_funsig : string -> ml_symbol
36    
37      (* getting the full analysis for a group/library (or an alias thereof) *)      (* getting the full analysis for a group/library *)
38      val alias : pathname -> group      val emptyGroup : group
39      val group : perms * exports * members -> group      val group : perms * exports * members -> group
40      val library : perms * exports * members -> group      val library : perms * exports * members -> group
41    
# Line 45  Line 46 
46    
47      (* constructing member collections *)      (* constructing member collections *)
48      val emptyMembers : members      val emptyMembers : members
49      val member : pathname * cm_symbol option -> members      val member : (pathname -> group)
50            -> { sourcepath: pathname, group: pathname, class: cm_symbol option }
51            -> members
52      val members : members * members -> members      val members : members * members -> members
53      val guarded_members : exp * (members * members) -> members      val guarded_members : exp * (members * members) -> members
54      val error_member : string -> members      val error_member : string -> members
# Line 92  Line 95 
95      structure SymPath = GenericVC.SymPath      structure SymPath = GenericVC.SymPath
96    
97      type pathname = AbsPath.t      type pathname = AbsPath.t
98        type context = AbsPath.context
99      type ml_symbol = Symbol.symbol      type ml_symbol = Symbol.symbol
100      type cm_symbol = string      type cm_symbol = string
101    
102      type group = unit      type group = Dummy.t
103    
104      type environment = MemberCollection.collection      type environment = MemberCollection.collection
105    
# Line 121  Line 125 
125      val ml_functor = Symbol.fctSymbol      val ml_functor = Symbol.fctSymbol
126      val ml_funsig = Symbol.fsigSymbol      val ml_funsig = Symbol.fsigSymbol
127    
128      fun alias (f: pathname) = ()      val emptyGroup = Dummy.v
129      fun group (p: perms, e: exports, m: members) = ()      fun group (p: perms, e: exports, m: members) =
130      fun library (p: perms, e: exports, m: members) = ()          (ignore (m MemberCollection.empty);
131             Dummy.v)
132        fun library (p: perms, e: exports, m: members) =
133            (ignore (m MemberCollection.empty);
134             Dummy.v)
135    
136      local      local
137          val isMember = StringSet.member          val isMember = StringSet.member
# Line 142  Line 150 
150               { required = required, granted = StringSet.add (granted, s) })               { required = required, granted = StringSet.add (granted, s) })
151      end      end
152    
153        (* get the export map from a group *)
154        fun getExports (g: group) = (ignore Dummy.v; SymbolMap.empty)
155    
156      fun emptyMembers env = env      fun emptyMembers env = env
157      fun member (f, c) env =      fun member rparse arg env = let
158          MemberCollection.sequential (env, MemberCollection.expandOne (f, c))          val coll = MemberCollection.expandOne (getExports o rparse) arg
159        in
160            MemberCollection.sequential (env, coll)
161        end
162      fun members (m1, m2) env = m2 (m1 env)      fun members (m1, m2) env = m2 (m1 env)
163      fun guarded_members (c, (m1, m2)) env =      fun guarded_members (c, (m1, m2)) env =
164          if saveEval (c, env) then m1 env else m2 env          if saveEval (c, env) then m1 env else m2 env
165      fun error_member m env = raise ExplicitError m      fun error_member m env =
166            (print (m ^ "\n");
167             raise ExplicitError m)
168    
169      fun emptyExports env = SymbolSet.empty      fun emptyExports env = SymbolSet.empty
170      fun export s env = SymbolSet.singleton s      fun export s env = SymbolSet.singleton s

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

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