summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile/mc09.hs
blob: f4a62fa6171528f82251096edc73cf8cac492cf9 (plain)
1
2
3
4
5
6
7
8
9
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]