summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler.sml6
-rw-r--r--tests/bad.ur1
-rw-r--r--tests/bad.urp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 6fd107a7..c4000e84 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -928,16 +928,16 @@ fun compileC {cname, oname, ename, libs, profile, debug, link = link'} =
val link = foldl (fn (s, link) => link ^ " " ^ s) link link'
in
if not (OS.Process.isSuccess (OS.Process.system compile)) then
- print "C compilation failed\n"
+ OS.Process.exit OS.Process.failure
else if not (OS.Process.isSuccess (OS.Process.system link)) then
- print "C linking failed\n"
+ OS.Process.exit OS.Process.failure
else
()
end
fun compile job =
case run toChecknest job of
- NONE => print "Ur compilation failed\n"
+ NONE => OS.Process.exit OS.Process.failure
| SOME file =>
let
val job = valOf (run (transform parseUrp "parseUrp") job)
diff --git a/tests/bad.ur b/tests/bad.ur
new file mode 100644
index 00000000..60419db7
--- /dev/null
+++ b/tests/bad.ur
@@ -0,0 +1 @@
+fun main $ = 0
diff --git a/tests/bad.urp b/tests/bad.urp
new file mode 100644
index 00000000..3e17f350
--- /dev/null
+++ b/tests/bad.urp
@@ -0,0 +1,2 @@
+
+bad