diff src/monoize.sml @ 1836:276fa06428ba

Ignore polymorphism in JavaScript calls to custom FFI functions, allowing a kind of simple dynamic typing (unsafe, of course)
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Dec 2012 15:58:23 -0500
parents a8b273f1f7e3
children 146ec8e90063
line wrap: on
line diff
--- a/src/monoize.sml	Fri Nov 30 10:02:13 2012 -0500
+++ b/src/monoize.sml	Tue Dec 11 15:58:23 2012 -0500
@@ -4087,7 +4087,15 @@
             in
                 ((L'.EAbs (x, monoType env dom, monoType env ran, e), loc), fm)
             end
-          | L.ECApp _ => poly ()
+
+          | L.ECApp (e, _) =>
+            let
+                val (e, fm) = monoExp (env, st, fm) e
+            in
+                case #1 e of
+                    L'.EFfi _ => (e, fm)
+                  | _ => poly ()
+            end
           | L.ECAbs _ => poly ()
 
           | L.EFfi mx => ((L'.EFfi mx, loc), fm)