diff options
author | 2014-01-29 18:29:43 -0500 | |
---|---|---|
committer | 2014-01-29 18:29:43 -0500 | |
commit | 1f074cea18228f4100972f7b51f68cd12db15f60 (patch) | |
tree | ebabcb7849ebd8c129f91ef17278e53525338496 /src/compiler.sml | |
parent | 50a8f1ffa063388b6c7c43bf3ecd8c4d92c77cdc (diff) | |
parent | 84d1243b0f9db53c9a25ee86e929ff7c6ea7f4f4 (diff) |
Merge in upstream
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 0ffab01c..21ae903f 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -86,6 +86,9 @@ val doIflow = ref false 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 @@ fun transform (ph : ('src, 'dst) phase) name = { (!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)) |