# HG changeset patch # User Adam Chlipala # Date 1220213587 14400 # Node ID 35ed669a253fdb5142dc54535bae9d7e6d502056 # Parent 02e1870a051636a21eb549f5eddf770eca08c28f Monoize unops diff -r 02e1870a0516 -r 35ed669a253f src/monoize.sml --- a/src/monoize.sml Sun Aug 31 16:11:15 2008 -0400 +++ b/src/monoize.sml Sun Aug 31 16:13:07 2008 -0400 @@ -781,6 +781,32 @@ (L.ECApp ( (L.ECApp ( (L.ECApp ( + (L.EFfi ("Basis", "sql_unary"), _), + _), _), + _), _), + _), _), + _), _), + _) => + let + val s = (L'.TFfi ("Basis", "string"), loc) + fun sc s = (L'.EPrim (Prim.String s), loc) + in + ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), + (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), + strcat loc [sc "(", + (L'.ERel 1, loc), + sc " ", + (L'.ERel 0, loc), + sc ")"]), loc)), loc), + fm) + end + | L.EFfi ("Basis", "sql_not") => ((L'.EPrim (Prim.String "NOT"), loc), fm) + + | L.ECApp ( + (L.ECApp ( + (L.ECApp ( + (L.ECApp ( + (L.ECApp ( (L.ECApp ( (L.EFfi ("Basis", "sql_binary"), _), _), _), diff -r 02e1870a0516 -r 35ed669a253f tests/where.ur --- a/tests/where.ur Sun Aug 31 16:11:15 2008 -0400 +++ b/tests/where.ur Sun Aug 31 16:13:07 2008 -0400 @@ -13,7 +13,7 @@ datatype list a = Nil | Cons of a * list a val r1 : transaction (list {A : int, B : string, C : float}) = - query q8 + query q7 (fn fs acc => return (Cons (fs.T1, acc))) Nil