From d4e5d7bbce0aac719ac2c6451e0a6bfb675ab641 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 21 Oct 2008 17:30:06 -0400 Subject: Form example --- lib/basis.urs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/basis.urs b/lib/basis.urs index de4204b3..212cccc6 100644 --- a/lib/basis.urs +++ b/lib/basis.urs @@ -366,15 +366,19 @@ val option : unit -> tag [Value = string] select [] [] [] val submit : ctx ::: {Unit} -> use ::: {Type} -> fn [[Form] ~ ctx] => unit - -> tag [Action = $use -> transaction page] + -> tag [Value = string, Action = $use -> transaction page] ([Form] ++ ctx) ([Form] ++ 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] [] [] +val tabl : other ::: {Unit} -> fn [other ~ [Body, Table]] => + unit -> tag [Border = int] ([Body] ++ other) ([Body, Table] ++ other) [] [] +val tr : other ::: {Unit} -> fn [other ~ [Body, Table, Tr]] => + unit -> tag [] ([Body, Table] ++ other) ([Body, Tr] ++ other) [] [] +val th : other ::: {Unit} -> fn [other ~ [Body, Tr]] => + unit -> tag [] ([Body, Tr] ++ other) ([Body] ++ other) [] [] +val td : other ::: {Unit} -> fn [other ~ [Body, Tr]] => + unit -> tag [] ([Body, Tr] ++ other) ([Body] ++ other) [] [] (** Aborting *) -- cgit v1.2.3