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

View of /sml/trunk/src/cm/compile/corehack.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: 919 byte(s)
bring revisions from the vendor branch to the trunk
(*
 * Re-write top-level bindings of a given symbol with corresponding bindings
 * of CoreSym.coreSym (i.e., "structure _Core").
 *
 * (C) 2000 Lucent Technologies, Bell Laboratories
 *
 * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
 *)
local
    structure A = GenericVC.Ast
in
    structure CoreHack : sig
	val rewrite : A.dec * Symbol.symbol -> A.dec
    end = struct
        fun rewrite (d, esy) = let
	    fun strb (x as A.Strb { name, def, constraint }) =
		if Symbol.eq (name, esy) then
		    A.Strb { name = CoreSym.coreSym, def = def,
			     constraint = constraint }
		else x
	      | strb (A.MarkStrb (x, r)) = A.MarkStrb (strb x, r)
	    fun dec (A.StrDec l) = A.StrDec (map strb l)
	      | dec (A.LocalDec (d1, d2)) = A.LocalDec (d1, dec d2)
	      | dec (A.SeqDec l) = A.SeqDec (map dec l)
	      | dec (A.MarkDec (d, r)) = A.MarkDec (dec d, r)
	      | dec d = d
	in
	    dec d
	end
    end
end

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