@@ -8,6 +8,7 @@ import Control.Monad (when)
88import Control.Applicative (ZipList(..))
99import Control.Concurrent (MVar, takeMVar, putMVar, newEmptyMVar)
1010import Control.Monad (replicateM, replicateM_)
11+import Data.Function ((&))
1112import Data.IORef (readIORef, modifyIORef, newIORef)
1213import Data.List (sort, foldl', scanl', findIndices, findIndex, elemIndices,
1314 elemIndex, find, intersperse, foldl1')
@@ -466,6 +467,11 @@ transformCombineOpsOrdered constr desc t eq = do
466467 transform (dropWhile (> 0)) t (S.dropWhile (> 0))
467468 prop (desc ++ " scan") $ transform (scanl' (+) 0) t (S.scanl' (+) 0)
468469
470+ -- XXX this does not fail when the SVar is shared, need to fix.
471+ prop (desc ++ " concurrent application") $
472+ transform (& (map (+1))) t (|& (S.map (+1)))
473+
474+
469475wrapMaybe :: Eq a1 => ([a1] -> a2) -> [a1] -> Maybe a2
470476wrapMaybe f =
471477 \x ->