summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-12-11 15:58:23 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-12-11 15:58:23 -0500
commit87d2e717c0d164759fce1df7d89f25fda8434586 (patch)
treea3420f76f92ec80cb6ca0d78438ea7ec9cfae0df /src
parenteab77d1d8c4c6bdc3b7857713c8bc1e5947f58d0 (diff)
Ignore polymorphism in JavaScript calls to custom FFI functions, allowing a kind of simple dynamic typing (unsafe, of course)
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index b1cef64b..39e4853b 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -4087,7 +4087,15 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
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)