summaryrefslogtreecommitdiff
path: root/tests
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
commit2e59aaacd591f76ba5d509284b835c8c34a034f5 (patch)
tree27d86d6061f3e52708492b82d0cfb82157c098cd /tests
parent1145290f6ac5b13fe94772c692caa3cdb55bbf5f (diff)
Wrapping works in Blog
Diffstat (limited to 'tests')
-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
+