aboutsummaryrefslogtreecommitdiff
path: root/src/nbc/fail.sml
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-03-15 15:26:20 -0400
committerCalvin <calvin@EESI>2013-03-15 15:26:20 -0400
commitb632667ce57af89691407bb8668e1512775278ae (patch)
treeb5742cef185f1cc4a7ba6005b5b4116ce7558a01 /src/nbc/fail.sml
parent39e39f82cc38d71018882b0aaaf58255858a7c56 (diff)
nbc added
Diffstat (limited to 'src/nbc/fail.sml')
-rw-r--r--src/nbc/fail.sml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nbc/fail.sml b/src/nbc/fail.sml
new file mode 100644
index 0000000..f3d324c
--- /dev/null
+++ b/src/nbc/fail.sml
@@ -0,0 +1,10 @@
+signature FAIL = sig
+ val fail: string -> 'a
+end
+
+structure Fail :> FAIL = struct
+ fun fail why = (
+ TextIO.output (TextIO.stdErr, why ^ "\n")
+ ; OS.Process.exit OS.Process.failure
+ )
+end