Mercurial > urweb
diff src/compiler.sml @ 1983:0ff4f64b4309
Merge in upstream
author | Patrick Hurst <phurst@mit.edu> |
---|---|
date | Wed, 29 Jan 2014 18:29:43 -0500 |
parents | 0652f295e0fa |
children | b15a4c2cb542 |
line wrap: on
line diff
--- a/src/compiler.sml Sat Jan 25 18:15:14 2014 -0500 +++ b/src/compiler.sml Wed Jan 29 18:29:43 2014 -0500 @@ -86,6 +86,9 @@ val doDumpSource = ref (fn () => ()) +val stop = ref (NONE : string option) +fun setStop s = stop := SOME s + fun transform (ph : ('src, 'dst) phase) name = { func = fn input => let val () = if !debug then @@ -102,6 +105,10 @@ (!doDumpSource (); doDumpSource := (fn () => ()); NONE) + else if !stop = SOME name then + (Print.eprint (#print ph v); + ErrorMsg.error ("Stopped compilation after phase " ^ name); + NONE) else (if !dumpSource then doDumpSource := (fn () => Print.eprint (#print ph v))