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/compiler/Semant/pickle/unpickle-sym-pid.sml
ViewVC logotype

View of /sml/trunk/src/compiler/Semant/pickle/unpickle-sym-pid.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 3 months ago) by monnier
File size: 1133 byte(s)
bring revisions from the vendor branch to the trunk
structure UnpickleSymPid :> sig
    val r_symbol : UnpickleUtil.session * string UnpickleUtil.reader ->
	Symbol.symbol UnpickleUtil.reader
    val r_pid : UnpickleUtil.session * string UnpickleUtil.reader ->
	PersStamps.persstamp UnpickleUtil.reader
end = struct
    fun r_symbol (session, r_string) = let
	val m = UnpickleUtil.mkMap ()
	fun s () = let
	    fun sym con = con (r_string ())
	    fun rs  #"a" = sym Symbol.varSymbol
	      | rs #"b" = sym Symbol.tycSymbol
	      | rs #"c" = sym Symbol.sigSymbol
	      | rs #"d" = sym Symbol.strSymbol
	      | rs #"e" = sym Symbol.fctSymbol
	      | rs #"f" = sym Symbol.fsigSymbol
	      | rs #"g" = sym Symbol.fixSymbol
	      | rs #"h" = sym Symbol.labSymbol
	      | rs #"i" = sym Symbol.tyvSymbol
	      | rs _ = raise UnpickleUtil.Format
	in
	    UnpickleUtil.share session m rs
	end
    in
	s
    end

    fun r_pid (session, r_string) = let
	val m = UnpickleUtil.mkMap ()
	fun p () = let
	    fun rp #"p" =
		PersStamps.fromBytes (Byte.stringToBytes (r_string ()))
	      | rp _ = raise UnpickleUtil.Format
	in
	    UnpickleUtil.share session m rp
	end
    in
	p
    end
end

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