# HG changeset patch # User Adam Chlipala # Date 1330809654 18000 # Node ID a7b70c7b3f1a9916935287393b257dfe4fb902c5 # Parent ae22d1fd9b8025909b21dde1de20850b0393055f Avoid 'not fully determined' errors for fancy tasks diff -r ae22d1fd9b80 -r a7b70c7b3f1a src/monoize.sml --- a/src/monoize.sml Sat Mar 03 15:47:52 2012 -0500 +++ b/src/monoize.sml Sat Mar 03 16:20:54 2012 -0500 @@ -4115,6 +4115,20 @@ let val (e1, fm) = monoExp (env, St.empty, fm) e1 val (e2, fm) = monoExp (env, St.empty, fm) e2 + + val un = (L'.TRecord [], loc) + val t = if MonoUtil.Exp.exists {typ = fn _ => false, + exp = fn L'.EFfiApp ("Basis", "periodic", _) => true + | _ => false} e1 then + (L'.TFfi ("Basis", "int"), loc) + else + un + + val e2 = (L'.EAbs ("$x", t, (L'.TFun (un, un), loc), + (L'.EAbs ("$y", un, un, + (L'.EApp ( + (L'.EApp (e2, (L'.ERel 1, loc)), loc), + (L'.ERel 0, loc)), loc)), loc)), loc) in SOME (env, fm,