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

Diff of /sml/trunk/src/cm/semant/group-reg.sml

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

revision 353, Thu Jun 24 09:43:28 1999 UTC revision 354, Fri Jun 25 08:36:12 1999 UTC
# Line 11  Line 11 
11      type groupreg      type groupreg
12    
13      val new : unit -> groupreg      val new : unit -> groupreg
14      val register : groupreg -> AbsPath.t * GenericVC.Source.inputSource -> unit      val register : groupreg -> SrcPath.t * GenericVC.Source.inputSource -> unit
15      val lookup : groupreg -> AbsPath.t -> GenericVC.Source.inputSource      val lookup : groupreg -> SrcPath.t -> GenericVC.Source.inputSource
16      val registered : groupreg -> AbsPath.t -> bool      val registered : groupreg -> SrcPath.t -> bool
17      val error :      val error :
18          groupreg          groupreg
19          -> AbsPath.t * GenericVC.SourceMap.region          -> SrcPath.t * GenericVC.SourceMap.region
20          -> GenericVC.ErrorMsg.complainer          -> GenericVC.ErrorMsg.complainer
21  end  end
22    
23  structure GroupReg :> GROUPREG = struct  structure GroupReg :> GROUPREG = struct
24    
25      type groupreg = GenericVC.Source.inputSource AbsPathMap.map ref      type groupreg = GenericVC.Source.inputSource SrcPathMap.map ref
26    
27      fun new () = ref AbsPathMap.empty : groupreg      fun new () = ref SrcPathMap.empty : groupreg
28    
29      fun register gr (p, s) = gr := AbsPathMap.insert (!gr, p, s)      fun register gr (p, s) = gr := SrcPathMap.insert (!gr, p, s)
30      fun lookup gr p = valOf (AbsPathMap.find (!gr, p))      fun lookup gr p = valOf (SrcPathMap.find (!gr, p))
31      fun registered gr g = isSome (AbsPathMap.find (!gr, g))      fun registered gr g = isSome (SrcPathMap.find (!gr, g))
32      fun error gr (g, r) = GenericVC.ErrorMsg.error (lookup gr g) r      fun error gr (g, r) = GenericVC.ErrorMsg.error (lookup gr g) r
33  end  end

Legend:
Removed from v.353  
changed lines
  Added in v.354

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