# HG changeset patch # User Adam Chlipala # Date 1260464763 18000 # Node ID b89e3d8731ed4f65dce8a1dc390a7cb083669d1b # Parent e3f6620afd51a72f0a35cf8eaa49ff8df243e686 Make oneRowE1 more general diff -r e3f6620afd51 -r b89e3d8731ed lib/ur/top.ur --- a/lib/ur/top.ur Tue Dec 08 12:06:41 2009 -0500 +++ b/lib/ur/top.ur Thu Dec 10 12:06:03 2009 -0500 @@ -258,7 +258,7 @@ None => error Query returned no rows | Some r => r) -fun oneRowE1 [tab ::: Name] [nm ::: Name] [t ::: Type] [[tab] ~ [nm]] (q : sql_query [tab = []] [nm = t]) = +fun oneRowE1 [tabs ::: {Unit}] [nm ::: Name] [t ::: Type] [tabs ~ [nm]] (q : sql_query (mapU [] tabs) [nm = t]) = o <- oneOrNoRows q; return (case o of None => error Query returned no rows diff -r e3f6620afd51 -r b89e3d8731ed lib/ur/top.urs --- a/lib/ur/top.urs Tue Dec 08 12:06:41 2009 -0500 +++ b/lib/ur/top.urs Thu Dec 10 12:06:03 2009 -0500 @@ -163,9 +163,9 @@ $(exps ++ map (fn fields :: {Type} => $fields) tables) -val oneRowE1 : tab ::: Name -> nm ::: Name -> t ::: Type - -> [[tab] ~ [nm]] => - sql_query [tab = []] [nm = t] +val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type + -> [tabs ~ [nm]] => + sql_query (mapU [] tabs) [nm = t] -> transaction t val eqNullable : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}