Mercurial > urweb
comparison src/monoize.sml @ 1690:a7b70c7b3f1a
Avoid 'not fully determined' errors for fancy tasks
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 03 Mar 2012 16:20:54 -0500 |
parents | ac141fbb313a |
children | 78ea155b6b14 |
comparison
equal
deleted
inserted
replaced
1689:ae22d1fd9b80 | 1690:a7b70c7b3f1a |
---|---|
4113 end | 4113 end |
4114 | L.DTask (e1, e2) => | 4114 | L.DTask (e1, e2) => |
4115 let | 4115 let |
4116 val (e1, fm) = monoExp (env, St.empty, fm) e1 | 4116 val (e1, fm) = monoExp (env, St.empty, fm) e1 |
4117 val (e2, fm) = monoExp (env, St.empty, fm) e2 | 4117 val (e2, fm) = monoExp (env, St.empty, fm) e2 |
4118 | |
4119 val un = (L'.TRecord [], loc) | |
4120 val t = if MonoUtil.Exp.exists {typ = fn _ => false, | |
4121 exp = fn L'.EFfiApp ("Basis", "periodic", _) => true | |
4122 | _ => false} e1 then | |
4123 (L'.TFfi ("Basis", "int"), loc) | |
4124 else | |
4125 un | |
4126 | |
4127 val e2 = (L'.EAbs ("$x", t, (L'.TFun (un, un), loc), | |
4128 (L'.EAbs ("$y", un, un, | |
4129 (L'.EApp ( | |
4130 (L'.EApp (e2, (L'.ERel 1, loc)), loc), | |
4131 (L'.ERel 0, loc)), loc)), loc)), loc) | |
4118 in | 4132 in |
4119 SOME (env, | 4133 SOME (env, |
4120 fm, | 4134 fm, |
4121 [(L'.DTask (e1, e2), loc)]) | 4135 [(L'.DTask (e1, e2), loc)]) |
4122 end | 4136 end |