diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 18:13:09 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 18:13:09 -0400 |
commit | 79655b086c036d07806d0c345ffc9e6683891fe4 (patch) | |
tree | 87cfafea0f563a41839fe248cd4de81e8a8efed1 /lib | |
parent | c69e0c432107906261ab4c56cd88a8cfab3191fb (diff) |
Fix nasty bugs with longjmp() looping for uw_set_input(); and bad variable indexes for nested JavaScript in jscomp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ur/listPair.ur | 10 | ||||
-rw-r--r-- | lib/ur/listPair.urs | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/ur/listPair.ur b/lib/ur/listPair.ur new file mode 100644 index 00000000..9a56f75a --- /dev/null +++ b/lib/ur/listPair.ur @@ -0,0 +1,10 @@ +fun mapX (a ::: Type) (b ::: Type) (ctx ::: {Unit}) f = + let + fun mapX' ls1 ls2 = + case (ls1, ls2) of + ([], []) => <xml/> + | (x1 :: ls1, x2 :: ls2) => <xml>{f x1 x2}{mapX' ls1 ls2}</xml> + | _ => error <xml>ListPair.mapX: Unequal list lengths</xml> + in + mapX' + end diff --git a/lib/ur/listPair.urs b/lib/ur/listPair.urs new file mode 100644 index 00000000..55a34b3a --- /dev/null +++ b/lib/ur/listPair.urs @@ -0,0 +1,2 @@ +val mapX : a ::: Type -> b ::: Type -> ctx ::: {Unit} + -> (a -> b -> xml ctx [] []) -> list a -> list b -> xml ctx [] [] |