From cdb7e3faa2ed5749eb3b11a2545cc679d054376a Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 2 Aug 2012 18:12:37 -0400 Subject: New NameJs phase, still needing some debugging --- tests/dynlines.ur | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/dynlines.ur (limited to 'tests/dynlines.ur') diff --git a/tests/dynlines.ur b/tests/dynlines.ur new file mode 100644 index 00000000..92866e69 --- /dev/null +++ b/tests/dynlines.ur @@ -0,0 +1,33 @@ +datatype lines = End | Line of source lines + +type t = { Head : source lines, Tail : source (source lines) } + +val create = + head <- source End; + tail <- source head; + return {Head = head, Tail = tail} + +fun renderL lines = + case lines of + End => + | Line linesS => X
+ +and renderS linesS = + lines <- signal linesS; + return (renderL lines) + +fun render t = renderS t.Head + +fun write t = + oldTail <- get t.Tail; + newTail <- source End; + set oldTail (Line newTail); + set t.Tail newTail + +fun main () : transaction page = + b <- create; + + return +