# HG changeset patch # User Adam Chlipala # Date 1224624860 14400 # Node ID 345fcf91c80639f59bedcca6dfc688d85737fde5 # Parent a71600cac815a22dccd4a37095b04e60d6a51462 Rec demo diff -r a71600cac815 -r 345fcf91c806 demo/prose --- a/demo/prose Tue Oct 21 17:30:06 2008 -0400 +++ b/demo/prose Tue Oct 21 17:34:20 2008 -0400 @@ -38,6 +38,10 @@

In link.ur, we see how easy it is to link to another page. The Ur/Web compiler guarantees that all links are valid. We just write some Ur/Web code inside an "antiquote" in our XML, denoting a transaction that will produce the new page if the link is clicked.

+rec.urp + +

Crafting webs of interlinked pages is easy, using recursion.

+ form.urp

Here we see a basic form. The type system tracks which form inputs we include, and it enforces that the form handler function expects a record containing exactly those fields, with exactly the proper types.

diff -r a71600cac815 -r 345fcf91c806 demo/rec.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/demo/rec.ur Tue Oct 21 17:34:20 2008 -0400 @@ -0,0 +1,7 @@ +fun main () = return + Go to the other one! + + +and other () = return + Return to main! + diff -r a71600cac815 -r 345fcf91c806 demo/rec.urp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/demo/rec.urp Tue Oct 21 17:34:20 2008 -0400 @@ -0,0 +1,2 @@ + +rec diff -r a71600cac815 -r 345fcf91c806 demo/rec.urs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/demo/rec.urs Tue Oct 21 17:34:20 2008 -0400 @@ -0,0 +1,1 @@ +val main : unit -> transaction page diff -r a71600cac815 -r 345fcf91c806 lib/basis.urs --- a/lib/basis.urs Tue Oct 21 17:30:06 2008 -0400 +++ b/lib/basis.urs Tue Oct 21 17:34:20 2008 -0400 @@ -333,6 +333,7 @@ val p : bodyTag [] val b : bodyTag [] val i : bodyTag [] +val tt : bodyTag [] val font : bodyTag [Size = int, Face = string] val h1 : bodyTag []