# HG changeset patch # User Adam Chlipala # Date 1220213475 14400 # Node ID 02e1870a051636a21eb549f5eddf770eca08c28f # Parent a6cb33f493664a43a6dc971e08d2d64ccbbc28de Monoize OFFSET diff -r a6cb33f49366 -r 02e1870a0516 src/monoize.sml --- a/src/monoize.sml Sun Aug 31 16:10:20 2008 -0400 +++ b/src/monoize.sml Sun Aug 31 16:11:15 2008 -0400 @@ -752,6 +752,16 @@ | L.EFfi ("Basis", "sql_no_offset") => ((L'.EPrim (Prim.String ""), loc), fm) + | L.EFfiApp ("Basis", "sql_offset", [e]) => + let + val (e, fm) = monoExp (env, st, fm) e + in + (strcat loc [ + (L'.EPrim (Prim.String " OFFSET "), loc), + (L'.EFfiApp ("Basis", "sqlifyInt", [e]), loc) + ], + fm) + end | L.EFfi ("Basis", "sql_eq") => ((L'.EPrim (Prim.String "="), loc), fm) diff -r a6cb33f49366 -r 02e1870a0516 tests/limit.ur --- a/tests/limit.ur Sun Aug 31 16:10:20 2008 -0400 +++ b/tests/limit.ur Sun Aug 31 16:11:15 2008 -0400 @@ -10,7 +10,7 @@ datatype list a = Nil | Cons of a * list a val r1 : transaction (list {A : int, B : string, C : float}) = - query (q2 3) + query (q4 3 7) (fn fs acc => return (Cons (fs.T, acc))) Nil