summaryrefslogtreecommitdiff
path: root/tests/nest.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 16:46:16 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 16:46:16 -0400
commit42b8f4ea4a237cdad253b5e5c654c6a71067b625 (patch)
tree27d86d6061f3e52708492b82d0cfb82157c098cd /tests/nest.ur
parentbcacd9c7aca307547ebff8dc7038b6f78156b507 (diff)
Wrapping works in Blog
Diffstat (limited to 'tests/nest.ur')
-rw-r--r--tests/nest.ur20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/nest.ur b/tests/nest.ur
index c136b1e6..8da50712 100644
--- a/tests/nest.ur
+++ b/tests/nest.ur
@@ -25,7 +25,24 @@ fun f (x : int) =
Some r => return <xml><body><a link={page1 ()}>{[r]}</a></body></xml>
| _ => return <xml>Error</xml>
in
- page1
+ page2
+ end
+
+fun f (x : int) =
+ let
+ fun page1 () = return <xml><body>
+ <a link={page2 ()}>{[x]}</a>
+ </body></xml>
+
+ and page2 () =
+ case Some True of
+ Some r => return <xml><body><a link={page1 ()}>{[r]}</a></body></xml>
+ | _ => return <xml><body><a link={page3 ()}>!!</a></body></xml>
+
+ and page3 () = return <xml><body><a link={page2 ()}>!</a><a link={page1 ()}>!</a>
+ <a link={page3 ()}>!</a></body></xml>
+ in
+ page3
end
datatype list t = Nil | Cons of t * list t
@@ -39,3 +56,4 @@ fun length (t ::: Type) (ls : list t) =
in
length' ls 0
end
+