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

SCM Repository

[smlnj] View of /sml/trunk/src/cm/semant/group-reg.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 281 - (download) (annotate)
Tue May 18 14:57:00 1999 UTC (20 years, 9 months ago) by blume
File size: 561 byte(s)
GroupReg added; bad error msg behavior fixed
signature GROUPREG = sig
    val clear : unit -> unit
    val register : AbsPath.t * GenericVC.Source.inputSource -> unit
    val lookup : AbsPath.t -> GenericVC.Source.inputSource
    val registered : AbsPath.t -> bool
end

structure GroupReg :> GROUPREG = struct

    val m  =
	ref (AbsPathMap.empty: GenericVC.Source.inputSource AbsPathMap.map)

    fun clear () = m := AbsPathMap.empty
    fun register (g, s) = m := AbsPathMap.insert (!m, g, s)
    fun lookup g = valOf (AbsPathMap.find (!m, g))
    fun registered g = isSome (AbsPathMap.find (!m, g))
end

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