aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 18:53:20 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 18:53:20 -0400
commitf946d43f10e2f78d179db30c3c9ae8dcc10f3c10 (patch)
tree96feb9219e03b0d172f13bf75f747e6f26efdefa /src/compiler.sml
parent3e65e1558de55a1a47a62690b48159d92a4ed072 (diff)
bool in Basis
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 2be17762..15d27b6b 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -430,7 +430,7 @@ fun compileC {cname, oname, ename} =
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 @@ fun compile job =
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"
-
- 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
+ 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;
+
+ compileC {cname = cname, oname = oname, ename = ename}
+ end
end