summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 17:41:52 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 17:41:52 -0400
commit48b9d4dae3d1ca6ff39e71571a6db3a43497c9f9 (patch)
tree22ffe528ac30aa133fde37ddcafb13a92cd22357 /lib
parent05fbd01cabc967d7216d8cbe701ac10ad797b122 (diff)
Crud listing IDs
Diffstat (limited to 'lib')
-rw-r--r--lib/basis.urs8
-rw-r--r--lib/top.ur6
-rw-r--r--lib/top.urs8
3 files changed, 22 insertions, 0 deletions
diff --git a/lib/basis.urs b/lib/basis.urs
index a095a57e..8737cbde 100644
--- a/lib/basis.urs
+++ b/lib/basis.urs
@@ -250,6 +250,7 @@ val useMore : ctx ::: {Unit} -> use1 ::: {Type} -> use2 ::: {Type} -> bind ::: {
con xhtml = xml [Html]
con page = xhtml [] []
+con xbody = xml [Body] [] []
(*** HTML details *)
@@ -304,6 +305,13 @@ val submit : ctx ::: {Unit} -> [LForm] ~ ctx
-> use ::: {Type} -> unit
-> tag [Action = $use -> transaction page] ([LForm] ++ ctx) ([LForm] ++ ctx) use []
+(*** Tables *)
+
+val tabl : unit -> tag [Border = int] [Body] [Body, Table] [] []
+val tr : unit -> tag [] [Body, Table] [Body, Tr] [] []
+val th : unit -> tag [] [Body, Tr] [Body] [] []
+val td : unit -> tag [] [Body, Tr] [Body] [] []
+
(** Aborting *)
diff --git a/lib/top.ur b/lib/top.ur
new file mode 100644
index 00000000..16d2ed42
--- /dev/null
+++ b/lib/top.ur
@@ -0,0 +1,6 @@
+con mapTT (f :: Type -> Type) = fold (fn nm t acc => [nm] ~ acc =>
+ [nm = f t] ++ acc) []
+
+fun compose (t1 ::: Type) (t2 ::: Type) (t3 ::: Type) (f1 : t2 -> t3) (f2 : t1 -> t2) (x : t1) = f1 (f2 x)
+
+fun txt (t ::: Type) (ctx ::: {Unit}) (use ::: {Type}) (sh : show t) (v : t) = cdata (show sh v)
diff --git a/lib/top.urs b/lib/top.urs
new file mode 100644
index 00000000..80344602
--- /dev/null
+++ b/lib/top.urs
@@ -0,0 +1,8 @@
+con mapTT = fn f :: Type -> Type => fold (fn nm t acc => [nm] ~ acc =>
+ [nm = f t] ++ acc) []
+
+val compose : t1 ::: Type -> t2 ::: Type -> t3 ::: Type
+ -> (t2 -> t3) -> (t1 -> t2) -> (t1 -> t3)
+
+val txt : t ::: Type -> ctx ::: {Unit} -> use ::: {Type} -> show t -> t
+ -> xml ctx use []