summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 15:23:04 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 15:23:04 -0400
commitc79947821b62c16f0a5a21fb5ec935c1dba00aae (patch)
tree3ed9eef6d1b6808215e7d7073c5b412839b98204 /tests
parent38dade494489b5d093cc9bb8f7542de1324f2d55 (diff)
Fix type class resolution infinite loop, discovered while meeting with Ezra
Diffstat (limited to 'tests')
-rw-r--r--tests/filter.ur9
-rw-r--r--tests/filter.urp4
-rw-r--r--tests/filter.urs1
3 files changed, 14 insertions, 0 deletions
diff --git a/tests/filter.ur b/tests/filter.ur
new file mode 100644
index 00000000..efd326c3
--- /dev/null
+++ b/tests/filter.ur
@@ -0,0 +1,9 @@
+fun filter [fs ::: {Type}] [ks] (t : sql_table fs ks) (p : sql_exp [T = fs] [] [] bool)
+ : sql_query [T = fs] [] =
+ (SELECT * FROM t WHERE {p})
+
+table t : { A : int, B : float }
+
+fun main () =
+ queryX (filter t (WHERE t.A > 3))
+ (fn r => <xml>{[r.T.A]}, {[r.T.B]}</xml>)
diff --git a/tests/filter.urp b/tests/filter.urp
new file mode 100644
index 00000000..102a1871
--- /dev/null
+++ b/tests/filter.urp
@@ -0,0 +1,4 @@
+debug
+database dbname=filter
+
+filter
diff --git a/tests/filter.urs b/tests/filter.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/filter.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page