aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 09:11:58 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 09:11:58 -0400
commit9e6bd5dd1394c99f0a9b29369a4957c958e0830c (patch)
tree40c991c6a8032bc73433e5d3f9c1db78a98674ef /lib
parent22b407de7cf9ee5cc5947369372d9ca8373134a6 (diff)
Fix a nasty binding bug in CoreUtil
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/list.ur10
-rw-r--r--lib/ur/list.urs1
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/ur/list.ur b/lib/ur/list.ur
index 5310c810..ecec2bec 100644
--- a/lib/ur/list.ur
+++ b/lib/ur/list.ur
@@ -29,3 +29,13 @@ fun mp (a ::: Type) (b ::: Type) f =
in
mp' []
end
+
+fun mapX (a ::: Type) (ctx ::: {Unit}) f =
+ let
+ fun mapX' ls =
+ case ls of
+ [] => <xml/>
+ | x :: ls => <xml>{f x}{mapX' ls}</xml>
+ in
+ mapX'
+ end
diff --git a/lib/ur/list.urs b/lib/ur/list.urs
index 879648ea..e9e097d4 100644
--- a/lib/ur/list.urs
+++ b/lib/ur/list.urs
@@ -6,3 +6,4 @@ val rev : a ::: Type -> t a -> t a
val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b
+val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] []