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/branches/rt-transition/cm/compile/corehack.sml
ViewVC logotype

View of /sml/branches/rt-transition/cm/compile/corehack.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2837 - (download) (annotate)
Fri Nov 2 19:35:43 2007 UTC (13 years, 5 months ago) by jhr
File size: 909 byte(s)
  Create a branch for the transition to the new runtime system.
 * 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)
    structure A = Ast
    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
	    dec d

ViewVC Help
Powered by ViewVC 1.0.0