diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 16:38:38 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 16:38:38 -0400 |
commit | 4bc363c5ec2724b9d310e17181ca87517c98aa68 (patch) | |
tree | c0dff25071f38e045374e6d001ef7356af04e5db /demo/batchFun.urs | |
parent | b8e7b835e7cde4cf374138467da8b16e93a65eb9 (diff) |
BatchG demo
Diffstat (limited to 'demo/batchFun.urs')
-rw-r--r-- | demo/batchFun.urs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/demo/batchFun.urs b/demo/batchFun.urs new file mode 100644 index 00000000..695576c5 --- /dev/null +++ b/demo/batchFun.urs @@ -0,0 +1,27 @@ +con colMeta = fn t_state :: (Type * Type) => + {Nam : string, + Show : t_state.1 -> xbody, + Inject : sql_injectable t_state.1, + + NewState : transaction t_state.2, + Widget : t_state.2 -> xbody, + ReadState : t_state.2 -> transaction t_state.1} +con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols) + +val int : string -> colMeta (int, source string) +val float : string -> colMeta (float, source string) +val string : string -> colMeta (string, source string) + +functor Make(M : sig + con cols :: {(Type * Type)} + constraint [Id] ~ cols + val fl : folder cols + + val tab : sql_table ([Id = int] ++ map fst cols) + + val title : string + + val cols : colsMeta cols + end) : sig + val main : unit -> transaction page +end |