diff src/monoize.sml @ 283:c0e4ac23522d

'error' function
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 10:02:27 -0400
parents 286f734db702
children ffe5b01908ae
line wrap: on
line diff
--- a/src/monoize.sml	Sun Sep 07 09:28:13 2008 -0400
+++ b/src/monoize.sml	Sun Sep 07 10:02:27 2008 -0400
@@ -1279,6 +1279,15 @@
                      _), _),
                     xml) => monoExp (env, st, fm) xml
 
+          | L.ECApp ((L.EFfi ("Basis", "error"), _), t) =>
+            let
+                val t = monoType env t
+            in
+                ((L'.EAbs ("s", (L'.TFfi ("Basis", "string"), loc), t,
+                           (L'.EError ((L'.ERel 0, loc), t), loc)), loc),
+                 fm)
+            end
+
           | L.EApp (e1, e2) =>
             let
                 val (e1, fm) = monoExp (env, st, fm) e1