summaryrefslogtreecommitdiff
path: root/lib/ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-12-20 21:06:25 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-12-20 21:06:25 -0500
commita8b2771f6e2526855ae3387b876d7f861b53c817 (patch)
treed9e53978a43e192feafccbc2c2cf18a227db4db6 /lib/ur
parent8e27e217fa4b6fbf34f588e70036fa7a21df5183 (diff)
Refactor HTML contexts to prevent some illegal nestings (that can crash the JavaScript runtime system)
Diffstat (limited to 'lib/ur')
-rw-r--r--lib/ur/basis.urs23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index a2209150..17e969ef 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -664,11 +664,18 @@ val useMore : ctx ::: {Unit} -> use1 ::: {Type} -> use2 ::: {Type}
con html = [Html]
con head = [Head]
-con body = [Dyn, Body]
-con form = [Dyn, Body, Form]
-con subform = [Dyn, Body, Subform]
-con tabl = [Dyn, Table]
-con tr = [Dyn, Tr]
+
+con body' = [MakeForm, Body]
+con form' = [Body, Form]
+con subform' = [Body, Subform]
+con tabl' = [MakeForm, Table]
+con tr' = [MakeForm, Tr]
+
+con body = [Dyn] ++ body'
+con form = [Dyn] ++ form'
+con subform = [Dyn] ++ subform'
+con tabl = [Dyn] ++ tabl'
+con tr = [Dyn] ++ tr'
con xhtml = xml html
con page = xhtml [] []
@@ -763,10 +770,10 @@ val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int,
Onload = transaction unit] ++ boxAttrs)
val form : ctx ::: {Unit} -> bind ::: {Type}
- -> [[Body, Form] ~ ctx] =>
+ -> [[MakeForm, Form] ~ ctx] =>
option css_class
- -> xml ([Body, Form] ++ ctx) [] bind
- -> xml ([Body] ++ ctx) [] []
+ -> xml ([Form] ++ ctx) [] bind
+ -> xml ([MakeForm] ++ ctx) [] []
val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type}
-> [[Form] ~ ctx] =>