summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile/mc09.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_compile/mc09.hs')
-rw-r--r--testsuite/tests/rename/should_compile/mc09.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/mc09.hs b/testsuite/tests/rename/should_compile/mc09.hs
new file mode 100644
index 0000000000..f4a62fa617
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc09.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE MonadComprehensions, TransformListComp #-}
+
+-- Test performed for TransformListComp and should work for monad comp aswell:
+-- GHC 7.0.1 failed because the renamer didn't attach
+-- all the used variables to the TransformListComp constructor
+
+module List where
+
+intersectFront :: Ord a => [a] -> [a] -> [a]
+intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y]