changeset 723:311ca1ae715d

Simplify type class requirement for tree demo
author Adam Chlipala <adamc@hcoop.net>
date Mon, 13 Apr 2009 08:44:32 -0400
parents f06880c8bf68
children 12ec14a6be0b
files demo/prose demo/treeFun.ur demo/treeFun.urs
diffstat 3 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/demo/prose	Sun Apr 12 14:21:19 2009 -0400
+++ b/demo/prose	Mon Apr 13 08:44:32 2009 -0400
@@ -104,7 +104,7 @@
         <li> SQL field names <tt>id</tt> (for primary keys) and <tt>parent</tt> (for parent links)</li>
         <li> A type-level record <tt>cols</tt> of field names besides <tt>id</tt> and <tt>parent</tt></li>
         <li> "Proofs" that <tt>id</tt> is distinct from <tt>parent</tt> and that neither of <tt>id</tt> and <tt>parent</tt> appears in <tt>cols</tt></li>
-        <li> Witnesses that both <tt>key</tt> and <tt>option key</tt> belong to the type class <tt>sql_injectable</tt>, which indicates that they are fair game to use with SQL</li>
+        <li> A witness that <tt>key</tt> belongs to the type class <tt>sql_injectable_prim</tt>, which indicates that both <tt>key</tt> and <tt>option key</tt> are fair game to use with SQL</li>
         <li> An SQL table <tt>tab</tt>, containing a field <tt>id</tt> of type <tt>key</tt>, a field <tt>parent</tt> of type <tt>option key</tt>, and every field of <tt>cols</tt></li>
 </ol>
 
--- a/demo/treeFun.ur	Sun Apr 12 14:21:19 2009 -0400
+++ b/demo/treeFun.ur	Mon Apr 13 08:44:32 2009 -0400
@@ -6,8 +6,7 @@
                  constraint [id] ~ [parent]
                  constraint [id, parent] ~ cols
 
-                 val key_inj : sql_injectable key
-                 val option_key_inj : sql_injectable (option key)
+                 val key_inj : sql_injectable_prim key
 
                  table tab : ([id = key, parent = option key] ++ cols)
              end) = struct
--- a/demo/treeFun.urs	Sun Apr 12 14:21:19 2009 -0400
+++ b/demo/treeFun.urs	Mon Apr 13 08:44:32 2009 -0400
@@ -6,8 +6,7 @@
                  constraint [id] ~ [parent]
                  constraint [id, parent] ~ cols
 
-                 val key_inj : sql_injectable key
-                 val option_key_inj : sql_injectable (option key)
+                 val key_inj : sql_injectable_prim key
 
                  table tab : ([id = key, parent = option key] ++ cols)
              end) : sig