From 9e6bd5dd1394c99f0a9b29369a4957c958e0830c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 14 May 2009 09:11:58 -0400 Subject: Fix a nasty binding bug in CoreUtil --- lib/ur/list.ur | 10 ++++++++++ lib/ur/list.urs | 1 + 2 files changed, 11 insertions(+) (limited to 'lib') 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 + [] => + | x :: ls => {f x}{mapX' ls} + 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 [] [] -- cgit v1.2.3