# HG changeset patch # User Adam Chlipala # Date 1239626672 14400 # Node ID 311ca1ae715d0a67f5de147aeb2a1eae6c0e3e6e # Parent f06880c8bf68408f69138d896a4488036ad4457e Simplify type class requirement for tree demo diff -r f06880c8bf68 -r 311ca1ae715d demo/prose --- 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 @@
  • SQL field names id (for primary keys) and parent (for parent links)
  • A type-level record cols of field names besides id and parent
  • "Proofs" that id is distinct from parent and that neither of id and parent appears in cols
  • -
  • Witnesses that both key and option key belong to the type class sql_injectable, which indicates that they are fair game to use with SQL
  • +
  • A witness that key belongs to the type class sql_injectable_prim, which indicates that both key and option key are fair game to use with SQL
  • An SQL table tab, containing a field id of type key, a field parent of type option key, and every field of cols
  • diff -r f06880c8bf68 -r 311ca1ae715d demo/treeFun.ur --- 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 diff -r f06880c8bf68 -r 311ca1ae715d demo/treeFun.urs --- 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