@@ -20,8 +20,8 @@ toListInterleaved = A.toList . interleaving
2020toListAsync :: AsyncT IO a -> IO [a]
2121toListAsync = A.toList . asyncly
2222
23−toListParallel :: ParallelT IO a -> IO [a]
24−toListParallel = A.toList . parallely
23+toListParallel :: Ord a => ParallelT IO a -> IO [a]
24+toListParallel = fmap sort . A.toList . parallely
2525
2626main :: IO ()
2727main = hspec $ do
@@ -398,7 +398,7 @@ thenBind = do
398398 it "Then and toList" $
399399 toListSerial (return (1 :: Int) >> return 2) `shouldReturn` ([2] :: [Int])
400400
401−type ToListType s = (forall a. s IO a -> IO [a])
401+type ToListType s = (forall a. Ord a => s IO a -> IO [a])
402402pureBind :: Monad (s IO) => ToListType s -> Spec
403403pureBind l = do
404404 it "Bind and toList" $
@@ -518,7 +518,7 @@ loops f tsrt hsrt = do
518518
519519bindAndComposeSimple
520520 :: (Streaming t, Alternative (t IO), Monad (t IO))
521− => (forall a. t IO a -> IO [a])
521+ => (forall a. Ord a => t IO a -> IO [a])
522522 -> (t IO Int -> t IO Int -> t IO Int)
523523 -> Spec
524524bindAndComposeSimple tl g = do
@@ -533,7 +533,7 @@ bindAndComposeSimple tl g = do
533533 where f = (>>=)
534534
535535bindAndComposeHierarchy
536− :: Monad (s IO) => (forall a. s IO a -> IO [a])
536+ :: Monad (s IO) => (forall a. Ord a => s IO a -> IO [a])
537537 -> ([s IO Int] -> s IO Int)
538538 -> Spec
539539bindAndComposeHierarchy tl g = do