X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftests%2FdeSugar%2Fds031.hs;fp=ghc%2Fcompiler%2Ftests%2FdeSugar%2Fds031.hs;h=6454e08d036f19ab3d0ebbad037acba645d0d729;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/tests/deSugar/ds031.hs b/ghc/compiler/tests/deSugar/ds031.hs new file mode 100644 index 0000000..6454e08 --- /dev/null +++ b/ghc/compiler/tests/deSugar/ds031.hs @@ -0,0 +1,5 @@ +foldPair :: (a->a->a,b->b->b) -> (a,b) -> [(a,b)] -> (a,b) +foldPair fg ab [] = ab +foldPair fg@(f,g) ab ((a,b):abs) = (f a u,g b v) + where (u,v) = foldPair fg ab abs +