diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-12-11 15:58:23 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-12-11 15:58:23 -0500 |
commit | 87d2e717c0d164759fce1df7d89f25fda8434586 (patch) | |
tree | a3420f76f92ec80cb6ca0d78438ea7ec9cfae0df /src | |
parent | eab77d1d8c4c6bdc3b7857713c8bc1e5947f58d0 (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.sml | 10 |
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) |