summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-13 14:29:36 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-13 14:29:36 -0400
commitba3e01e524907d85f5cba6af62083fcdee606f33 (patch)
tree1f400f83f20ef1f54d68e1e7b674a08f29abb4d4 /lib
parentb7de8e9ac590f9d06df72d22489375b33a6efef9 (diff)
<dyn> inside <table>; fix Specialize bug with datatype decls generating other mutually-recursive datatype decls
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js23
-rw-r--r--lib/ur/basis.urs4
2 files changed, 16 insertions, 11 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index efd94bb9..60de8744 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -278,15 +278,20 @@ function dyn(s) {
for (var ls = x.closures; ls; ls = ls.next)
freeClosure(ls.data);
- var spans = x.getElementsByTagName("span");
- for (var i = 0; i < spans.length; ++i) {
- var span = spans[i];
- span.dead = true;
- for (var ls = span.sources; ls; ls = ls.next)
- ls.data.dyns = remove(span, ls.data.dyns);
- for (var ls = span.closures; ls; ls = ls.next)
- freeClosure(ls.data);
- }
+ var doKind = function(kind) {
+ var arr = x.getElementsByTagName(kind);
+ for (var i = 0; i < arr.length; ++i) {
+ var span = arr[i];
+ span.dead = true;
+ for (var ls = span.sources; ls; ls = ls.next)
+ ls.data.dyns = remove(span, ls.data.dyns);
+ for (var ls = span.closures; ls; ls = ls.next)
+ freeClosure(ls.data);
+ }
+ };
+
+ doKind("span");
+ doKind("tbody");
var cls = {v : null};
x.innerHTML = flatten(cls, v);
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 50909804..e4f4c28a 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -530,8 +530,8 @@ type url
val bless : string -> url
val checkUrl : string -> option url
-val dyn : use ::: {Type} -> bind ::: {Type} -> unit
- -> tag [Signal = signal (xml body use bind)] body [] use bind
+val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ body] => unit
+ -> tag [Signal = signal (xml (body ++ ctx) use bind)] (body ++ ctx) [] use bind
val head : unit -> tag [] html head [] []
val title : unit -> tag [] head [] [] []