# HG changeset patch # User Adam Chlipala # Date 1355259503 18000 # Node ID 276fa06428ba7c2872b1ad13e46a6f079bae017d # Parent a8b273f1f7e32f7920b71bc2c28830c8bd5b3a2f Ignore polymorphism in JavaScript calls to custom FFI functions, allowing a kind of simple dynamic typing (unsafe, of course) diff -r a8b273f1f7e3 -r 276fa06428ba src/monoize.sml --- 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) diff -r a8b273f1f7e3 -r 276fa06428ba tests/polyjs.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/polyjs.ur Tue Dec 11 15:58:23 2012 -0500 @@ -0,0 +1,5 @@ +open PolyjsFfi + +fun main () : transaction page = return +