Mercurial > urweb
diff lib/ur/basis.urs @ 678:5ff1ff38e2db
Preliminary work supporting channels in databases
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Mar 2009 16:22:34 -0400 |
parents | e0c186464612 |
children | 5bbb542243e8 |
line wrap: on
line diff
--- a/lib/ur/basis.urs Thu Mar 26 15:54:04 2009 -0400 +++ b/lib/ur/basis.urs Thu Mar 26 16:22:34 2009 -0400 @@ -107,6 +107,15 @@ val alert : string -> transaction unit +(** Channels *) + +con channel :: Type -> Type +val channel : t ::: Type -> transaction (channel t) +val subscribe : t ::: Type -> channel t -> transaction unit +val send : t ::: Type -> channel t -> t -> transaction unit +val recv : t ::: Type -> channel t -> transaction t + + (** SQL *) con sql_table :: {Type} -> Type @@ -196,9 +205,13 @@ val sql_string : sql_injectable_prim string val sql_time : sql_injectable_prim time +class sql_injectable_nullable +val sql_channel : t ::: Type -> sql_injectable_nullable (channel t) + class sql_injectable val sql_prim : t ::: Type -> sql_injectable_prim t -> sql_injectable t val sql_option_prim : t ::: Type -> sql_injectable_prim t -> sql_injectable (option t) +val sql_nullable : t ::: Type -> sql_injectable_nullable t -> sql_injectable (option t) val sql_inject : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type} -> t ::: Type @@ -454,10 +467,3 @@ val error : t ::: Type -> xml [Body] [] [] -> t -(** Channels *) - -con channel :: Type -> Type -val channel : t ::: Type -> transaction (channel t) -val subscribe : t ::: Type -> channel t -> transaction unit -val send : t ::: Type -> channel t -> t -> transaction unit -val recv : t ::: Type -> channel t -> transaction t