comparison demo/more/grid1.ur @ 1647:c815dabcfe3c

Finish updating Grid1 demo to work with type inference change
author Adam Chlipala <adam@chlipala.net>
date Thu, 29 Dec 2011 09:47:41 -0500
parents 8d3aa6c7cee0
children edf86cef0dba
comparison
equal deleted inserted replaced
1646:ca3b73a7b4d0 1647:c815dabcfe3c
9 CONSTRAINT Foreign FOREIGN KEY (D) REFERENCES t1(Id) ON DELETE CASCADE 9 CONSTRAINT Foreign FOREIGN KEY (D) REFERENCES t1(Id) ON DELETE CASCADE
10 10
11 fun page (n, s) = return <xml>A = {[n]}, B = {[s]}</xml> 11 fun page (n, s) = return <xml>A = {[n]}, B = {[s]}</xml>
12 12
13 open Make(struct 13 open Make(struct
14 structure F = Direct.Foreign(struct
15 con nm = #Id
16 con t = _
17 val tab = t1
18 fun render r = r.A
19 end)
20
14 val tab = t 21 val tab = t
15 con key = [Id = _] 22 con key = [Id = _]
23 con row = _
16 24
17 val raw = {Id = {New = nextval s, 25 val raw = {Id = {New = nextval s,
18 Inj = _}, 26 Inj = _},
19 A = {New = return 0, 27 A = {New = return 0,
20 Inj = _}, 28 Inj = _},
26 Inj = _}, 34 Inj = _},
27 E = {New = return None, 35 E = {New = return None,
28 Inj = _}, 36 Inj = _},
29 F = {New = return None, 37 F = {New = return None,
30 Inj = _}} 38 Inj = _}}
31
32 structure F = Direct.Foreign(struct
33 con nm = #Id
34 val tab = t1
35 fun render r = r.A
36 end)
37 39
38 val cols = {Id = Direct.readOnly [#Id] "Id" Direct.int, 40 val cols = {Id = Direct.readOnly [#Id] "Id" Direct.int,
39 A = Direct.editable [#A] "A" Direct.int, 41 A = Direct.editable [#A] "A" Direct.int,
40 B = Direct.editable [#B] "B" Direct.string, 42 B = Direct.editable [#B] "B" Direct.string,
41 C = Direct.editable [#C] "C" Direct.bool, 43 C = Direct.editable [#C] "C" Direct.bool,