comparison demo/batchFun.urs @ 1002:bb3fc575cfe7

Adapted existing demos to tuple pattern-matching
author Adam Chlipala <adamc@hcoop.net>
date Tue, 20 Oct 2009 10:29:17 -0400
parents 1fb318c17546
children
comparison
equal deleted inserted replaced
1001:1d456a06ea4e 1002:bb3fc575cfe7
1 con colMeta = fn t_state :: (Type * Type) => 1 con colMeta = fn (db :: Type, state :: Type) =>
2 {Nam : string, 2 {Nam : string,
3 Show : t_state.1 -> xbody, 3 Show : db -> xbody,
4 Inject : sql_injectable t_state.1, 4 Inject : sql_injectable db,
5 5
6 NewState : transaction t_state.2, 6 NewState : transaction state,
7 Widget : t_state.2 -> xbody, 7 Widget : state -> xbody,
8 ReadState : t_state.2 -> transaction t_state.1} 8 ReadState : state -> transaction db}
9 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols) 9 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols)
10 10
11 val int : string -> colMeta (int, source string) 11 val int : string -> colMeta (int, source string)
12 val float : string -> colMeta (float, source string) 12 val float : string -> colMeta (float, source string)
13 val string : string -> colMeta (string, source string) 13 val string : string -> colMeta (string, source string)