comparison lib/basis.lig @ 204:241c9a0e3397

Parsing the simplest SQL query
author Adam Chlipala <adamc@hcoop.net>
date Thu, 14 Aug 2008 13:59:11 -0400
parents dd82457fda82
children cc68da3801bc
comparison
equal deleted inserted replaced
203:dd82457fda82 204:241c9a0e3397
8 8
9 9
10 (** SQL *) 10 (** SQL *)
11 11
12 con sql_table :: {Type} -> Type 12 con sql_table :: {Type} -> Type
13
14 (*** Queries *)
15
16 con sql_query :: {{Type}} -> Type
17
18 val sql_query : tables ::: {{Type}}
19 -> $(fold (fn nm => fn ts => fn acc => [nm] ~ acc =>
20 [nm = sql_table ts] ++ acc) [] tables)
21 -> sql_query tables
13 22
14 23
15 (** XML *) 24 (** XML *)
16 25
17 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type 26 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type
38 -> xml ctx use1 bind 47 -> xml ctx use1 bind
39 -> xml ctx (use1 ++ use2) bind 48 -> xml ctx (use1 ++ use2) bind
40 49
41 con xhtml = xml [Html] 50 con xhtml = xml [Html]
42 con page = xhtml [] [] 51 con page = xhtml [] []
52
53 (*** HTML details *)
43 54
44 con html = [Html] 55 con html = [Html]
45 con head = [Head] 56 con head = [Head]
46 con body = [Body] 57 con body = [Body]
47 con lform = [Body, LForm] 58 con lform = [Body, LForm]