Mercurial > urweb
diff src/compiler.sml @ 186:88d46972de53
bool in Basis
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 Aug 2008 18:53:20 -0400 |
parents | c0ea24dcb86f |
children | 8a70e2919e86 |
line wrap: on
line diff
--- a/src/compiler.sml Sun Aug 03 17:57:47 2008 -0400 +++ b/src/compiler.sml Sun Aug 03 18:53:20 2008 -0400 @@ -430,7 +430,7 @@ if not (OS.Process.isSuccess (OS.Process.system compile)) then print "C compilation failed\n" else if not (OS.Process.isSuccess (OS.Process.system link)) then - print "C linking failed\n" + print "C linking failed\n" else print "Success\n" end @@ -439,18 +439,21 @@ case cjrize job of NONE => print "Laconic compilation failed\n" | SOME file => - let - val cname = "/tmp/lacweb.c" - val oname = "/tmp/lacweb.o" - val ename = "/tmp/webapp" + if ErrorMsg.anyErrors () then + print "Laconic compilation failed\n" + else + let + val cname = "/tmp/lacweb.c" + val oname = "/tmp/lacweb.o" + val ename = "/tmp/webapp" - val outf = TextIO.openOut cname - val s = TextIOPP.openOut {dst = outf, wid = 80} - in - Print.fprint s (CjrPrint.p_file CjrEnv.empty file); - TextIO.closeOut outf; + val outf = TextIO.openOut cname + val s = TextIOPP.openOut {dst = outf, wid = 80} + in + Print.fprint s (CjrPrint.p_file CjrEnv.empty file); + TextIO.closeOut outf; - compileC {cname = cname, oname = oname, ename = ename} - end + compileC {cname = cname, oname = oname, ename = ename} + end end