From 6217967a353bc9d97ae45c2af495b653a47e2481 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 29 Mar 2009 11:37:29 -0400 Subject: Redo channels, making them single-client --- lib/ur/top.urs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/ur/top.urs') diff --git a/lib/ur/top.urs b/lib/ur/top.urs index bc0b768e..821aa42a 100644 --- a/lib/ur/top.urs +++ b/lib/ur/top.urs @@ -87,6 +87,13 @@ val foldRX2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) -> ctx :: {Unit} -> r :: {K} -> folder r -> $(map tf1 r) -> $(map tf2 r) -> xml ctx [] [] +val queryI : tables ::: {{Type}} -> exps ::: {Type} + -> [tables ~ exps] => + sql_query tables exps + -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) + -> transaction unit) + -> transaction unit + val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> [tables ~ exps] => sql_query tables exps @@ -127,3 +134,14 @@ val eqNullable' : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type} -> sql_exp tables agg exps (option t) -> option t -> sql_exp tables agg exps bool + + +functor Broadcast(M : sig type t end) : sig + type topic + + val inj : sql_injectable topic + + val create : transaction topic + val subscribe : topic -> transaction (channel M.t) + val send : topic -> M.t -> transaction unit +end -- cgit v1.2.3