comparison demo/batchFun.ur @ 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 ed06e25c70ef
children 8d3aa6c7cee0
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 fun default [t] (sh : show t) (rd : read t) (inj : sql_injectable t) 11 fun default [t] (sh : show t) (rd : read t) (inj : sql_injectable t)
12 name : colMeta (t, source string) = 12 name : colMeta (t, source string) =
13 {Nam = name, 13 {Nam = name,