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

View of /sml/trunk/src/compiler/Semant/pickle/pickle-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, 4 months ago) by monnier
File size: 869 byte(s)
bring revisions from the vendor branch to the trunk
structure PickleSymPid :> sig
    val w_symbol : ('ahm, Symbol.symbol) PickleUtil.pickler
    val w_pid : ('ahm, PersStamps.persstamp) PickleUtil.pickler
end = struct
    structure PU = PickleUtil

    local
	val S = ~100	    (* dangerous! coordinate with PickleUtil! *)
    in
	fun w_symbol s = let
	    val $ = PU.$ S
	    infix $
	    val ns =
		case Symbol.nameSpace s of
		    Symbol.VALspace => "a"
		  | Symbol.TYCspace => "b"
		  | Symbol.SIGspace => "c"
		  | Symbol.STRspace => "d"
		  | Symbol.FCTspace => "e"
		  | Symbol.FSIGspace => "f"
		  | Symbol.FIXspace => "g"
		  | Symbol.LABspace => "h"
		  | Symbol.TYVspace => "i"
	in
	    ns $ [PU.w_string (Symbol.name s)]
	end
    end

    local
	val P = ~101
    in
	fun w_pid p = let
	    val $ = PU.$ P
	    infix $
	in
	    "p" $ [PU.w_string (Byte.bytesToString (PersStamps.toBytes p))]
	end
    end
end

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