From bda701f557d0e9aadd4717dd4fd6a38ac8ceb1eb Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 21 Oct 2008 17:34:20 -0400 Subject: Rec demo --- demo/prose | 4 ++++ demo/rec.ur | 7 +++++++ demo/rec.urp | 2 ++ demo/rec.urs | 1 + lib/basis.urs | 1 + 5 files changed, 15 insertions(+) create mode 100644 demo/rec.ur create mode 100644 demo/rec.urp create mode 100644 demo/rec.urs diff --git a/demo/prose b/demo/prose index fe4eb1ea..a22e1968 100644 --- a/demo/prose +++ b/demo/prose @@ -38,6 +38,10 @@ link.urp

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 --git a/demo/rec.ur b/demo/rec.ur new file mode 100644 index 00000000..a8084462 --- /dev/null +++ b/demo/rec.ur @@ -0,0 +1,7 @@ +fun main () = return + Go to the other one! + + +and other () = return + Return to main! + diff --git a/demo/rec.urp b/demo/rec.urp new file mode 100644 index 00000000..979d20d5 --- /dev/null +++ b/demo/rec.urp @@ -0,0 +1,2 @@ + +rec diff --git a/demo/rec.urs b/demo/rec.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/demo/rec.urs @@ -0,0 +1 @@ +val main : unit -> transaction page diff --git a/lib/basis.urs b/lib/basis.urs index 212cccc6..53c4529d 100644 --- a/lib/basis.urs +++ b/lib/basis.urs @@ -333,6 +333,7 @@ val br : bodyTagStandalone [] val p : bodyTag [] val b : bodyTag [] val i : bodyTag [] +val tt : bodyTag [] val font : bodyTag [Size = int, Face = string] val h1 : bodyTag [] -- cgit v1.2.3