diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-10 12:06:03 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-10 12:06:03 -0500 |
commit | 14163f6e6e160694eff3d409ca3cf0b8b76c4a3a (patch) | |
tree | 43cb064726f954a8e07bf4ce22fd55ece12fc24c | |
parent | 4a4982421afb15dcfea3561a5763adf5ba22409e (diff) |
Make oneRowE1 more general
-rw-r--r-- | lib/ur/top.ur | 2 | ||||
-rw-r--r-- | lib/ur/top.urs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index 423507b5..ffdd85bf 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -258,7 +258,7 @@ fun oneRow [tables ::: {{Type}}] [exps ::: {Type}] None => error <xml>Query returned no rows</xml> | 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 <xml>Query returned no rows</xml> diff --git a/lib/ur/top.urs b/lib/ur/top.urs index 6470d7d7..2b6248fc 100644 --- a/lib/ur/top.urs +++ b/lib/ur/top.urs @@ -163,9 +163,9 @@ val oneRow : tables ::: {{Type}} -> exps ::: {Type} $(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} |