simonmar / monad-par

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failures with mtl-2.3

sjakobi opened this issue · comments

GHC error messages
Control/Monad/Par/Scheds/Direct.hs:158:24: error:
    • Variable not in scope:
        lift
          :: a0 -> ContT () Control.Monad.Par.Scheds.DirectInternal.ROnly a
    • Perhaps you meant one of these:
        ‘RD.lift’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative)
    |
158 | unsafeParIO iom = Par (lift$ lift iom)
    |                        ^^^^

Control/Monad/Par/Scheds/Direct.hs:158:30: error:
    • Variable not in scope: lift :: IO a -> a0
    • Perhaps you meant one of these:
        ‘RD.lift’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative)
    |
158 | unsafeParIO iom = Par (lift$ lift iom)
    |                              ^^^^

Control/Monad/Par/Scheds/Direct.hs:210:3: error:
    Variable not in scope: when :: Bool -> IO () -> IO a38
    |
210 |   when dbg $ case mb of
    |   ^^^^

Control/Monad/Par/Scheds/Direct.hs:220:3: error:
    Variable not in scope: when :: Bool -> IO () -> IO a41
    |
220 |   when dbg $ do sn <- makeStableName task
    |   ^^^^

Control/Monad/Par/Scheds/Direct.hs:234:3: error:
    Variable not in scope: when :: Bool -> IO () -> IO ()
    |
234 |   when (not (Prelude.null idles)) $ do
    |   ^^^^

Control/Monad/Par/Scheds/Direct.hs:235:5: error:
    Variable not in scope: when :: Bool -> a39 -> IO a40
    |
235 |     when dbg$ printf "Waking %d idle thread(s).\n" (length idles)
    |     ^^^^

Control/Monad/Par/Scheds/Direct.hs:272:24: error:
    Variable not in scope: when :: Bool -> Par () -> Par a19
    |
272 |     let userComp' = do when dbg$ io$ do
    |                        ^^^^

Control/Monad/Par/Scheds/Direct.hs:278:31: error:
    Variable not in scope: when :: Bool -> IO () -> IO a18
    |
278 |                        io$ do when (dbglvl>=1) $ do
    |                               ^^^^

Control/Monad/Par/Scheds/Direct.hs:287:28: error:
    • Variable not in scope:
        liftIO :: IO Bool -> RD.ReaderT Sched IO t0
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
287 |         loop n = do flg <- liftIO$ readIORef newFlag
    |                            ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:288:21: error:
    Variable not in scope:
      unless :: t0 -> RD.ReaderT Sched IO () -> RD.ReaderT Sched IO ()
    |
288 |                     unless flg $ do
    |                     ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:289:23: error:
    Variable not in scope:
      when :: Bool -> a16 -> RD.ReaderT Sched IO a17
    |
289 |                       when dbg $ liftIO$ do
    |                       ^^^^

Control/Monad/Par/Scheds/Direct.hs:289:34: error:
    • Variable not in scope: liftIO :: IO () -> a16
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
289 |                       when dbg $ liftIO$ do
    |                                  ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:301:5: error:
    Variable not in scope: when :: Bool -> IO () -> IO a15
    |
301 |     when (dbglvl>=1)$ do
    |     ^^^^

Control/Monad/Par/Scheds/Direct.hs:350:8: error:
    Variable not in scope: when :: Bool -> a35 -> IO a36
    |
350 |        when (dbglvl>=1)$ printf " [%d %s] runPar called from existing worker thread, new session (%d)....\n" (no sched) (show tid) (sid0 + 1)
    |        ^^^^

Control/Monad/Par/Scheds/Direct.hs:361:21: error:
    • Variable not in scope:
        forM
          :: [(a33, Sched)]
             -> ((Int, Sched) -> IO (Maybe (MVar Int))) -> IO [Maybe a34]
    • Perhaps you meant one of these:
        ‘PC.fork’ (imported from Control.Monad.Par.Class),
        ‘fork’ (line 576)
    |
361 |        doneFlags <- forM (zip [0..] allscheds) $ \(cpu,sched) -> do
    |                     ^^^^

Control/Monad/Par/Scheds/Direct.hs:371:26: error:
    Variable not in scope: when :: Bool -> a31 -> IO a32
    |
371 |                  then do when dbg$ printf " [%d %s] Anonymous worker entering scheduling loop.\n" cpu (show tid2)
    |                          ^^^^

Control/Monad/Par/Scheds/Direct.hs:373:26: error:
    Variable not in scope: when :: Bool -> a29 -> IO a30
    |
373 |                          when dbg$ printf " [%d] Anonymous worker exited scheduling loop.  FINISHED.\n" cpu
    |                          ^^^^

Control/Monad/Par/Scheds/Direct.hs:379:26: error:
    Variable not in scope: when :: Bool -> a27 -> IO a28
    |
379 |                          when dbg$ do printf " *** Out of entire runContT user computation on main thread %s.\n" (show tid2)
    |                          ^^^^

Control/Monad/Par/Scheds/Direct.hs:387:8: error:
    Variable not in scope: when :: Bool -> m1 b3 -> IO a26
    |
387 |        when _WAIT_FOR_WORKERS $ do
    |        ^^^^

Control/Monad/Par/Scheds/Direct.hs:388:12: error:
    Variable not in scope: when :: Bool -> a24 -> m1 a25
    |
388 |            when dbg$ printf " *** [%s] Originator thread: waiting for workers to complete." (show tidorig)
    |            ^^^^

Control/Monad/Par/Scheds/Direct.hs:389:12: error:
    Variable not in scope:
      forM_ :: [a34] -> (MVar a23 -> IO b2) -> m1 b3
    |
389 |            forM_ (catMaybes doneFlags) $ \ mv -> do
    |            ^^^^^

Control/Monad/Par/Scheds/Direct.hs:392:14: error:
    Variable not in scope: when :: Bool -> a22 -> IO b2
    |
392 |              when dbg$ printf "   * [%s]  Worker %s completed\n" (show tidorig) (show n)
    |              ^^^^

Control/Monad/Par/Scheds/Direct.hs:394:8: error:
    Variable not in scope: when :: Bool -> a20 -> IO a21
    |
394 |        when dbg$ do printf " *** [%s] Reading final MVar on originator thread.\n" (show tidorig)
    |        ^^^^

Control/Monad/Par/Scheds/Direct.hs:411:4: error:
    Variable not in scope: when :: Bool -> IO () -> IO a42
    |
411 |    when dbg$ do tid <- myThreadId
    |    ^^^^

Control/Monad/Par/Scheds/Direct.hs:413:17: error:
    • Variable not in scope:
        replicateM
          :: Int -> IO (SimpleDeque elt0) -> IO [SimpleDeque (Par ())]
    • Perhaps you meant ‘replicate’ (imported from Prelude)
    |
413 |    workpools <- replicateM numCapabilities $ R.newQ
    |                 ^^^^^^^^^^

Control/Monad/Par/Scheds/Direct.hs:414:17: error:
    • Variable not in scope:
        replicateM
          :: Int
             -> IO (HotVar (Random.Gen ghc-prim-0.8.0:GHC.Prim.RealWorld))
             -> IO [HotVar (Random.Gen ghc-prim-0.8.0:GHC.Prim.RealWorld)]
    • Perhaps you meant ‘replicate’ (imported from Prelude)
    |
414 |    rngs      <- replicateM numCapabilities $ Random.create >>= newHotVar
    |                 ^^^^^^^^^^

Control/Monad/Par/Scheds/Direct.hs:592:7: error:
    Variable not in scope: when :: Bool -> Par () -> Par ()
    |
592 |       when dbg$ do
    |       ^^^^

Control/Monad/Par/Scheds/Direct.hs:599:7: error:
    Variable not in scope: when :: Bool -> Par () -> Par a56
    |
599 |       when dbg$ io$ printf " [%d] forking task...\n" (no sch)
    |       ^^^^

Control/Monad/Par/Scheds/Direct.hs:612:3: error:
    Variable not in scope:
      when :: Bool -> a13 -> RD.ReaderT Sched IO a14
    |
612 |   when dbg$ liftIO$ do tid <- myThreadId
    |   ^^^^

Control/Monad/Par/Scheds/Direct.hs:612:13: error:
    • Variable not in scope: liftIO :: IO () -> a13
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
612 |   when dbg$ liftIO$ do tid <- myThreadId
    |             ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:617:13: error:
    • Variable not in scope:
        liftIO
          :: IO (Maybe (Par ())) -> RD.ReaderT Sched IO (Maybe (Par a12))
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
617 |   mtask  <- liftIO$ popWork mysched
    |             ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:620:43: error:
    • Variable not in scope:
        liftIO :: IO [Session] -> RD.ReaderT Sched IO [Session]
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
620 |                   (Session _ finRef):_ <- liftIO$ readIORef $ sessions mysched
    |                                           ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:621:26: error:
    • Variable not in scope:
        liftIO :: IO Bool -> RD.ReaderT Sched IO Bool
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
621 |                   fin <- liftIO$ readIORef finRef
    |                          ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:623:28: error:
    Variable not in scope:
      when :: Bool -> a10 -> RD.ReaderT Sched IO a11
    |
623 |                    then do when (dbglvl >= 1) $ liftIO $ do
    |                            ^^^^

Control/Monad/Par/Scheds/Direct.hs:623:49: error:
    • Variable not in scope: liftIO :: IO b1 -> a10
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
623 |                    then do when (dbglvl >= 1) $ liftIO $ do
    |                                                 ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:629:30: error:
    Variable not in scope: when :: Bool -> a9 -> IO b1
    |
629 |                              when (not empt) $ do
    |                              ^^^^

Control/Monad/Par/Scheds/Direct.hs:640:22: error:
    • Variable not in scope: liftIO :: IO () -> RD.ReaderT Sched IO a8
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
640 |                      liftIO$ steal mysched
    |                      ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:644:22: error:
    • Variable not in scope: liftIO :: IO () -> RD.ReaderT Sched IO a7
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
644 |                      liftIO yield
    |                      ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:648:8: error:
    Variable not in scope:
      when :: Bool -> m0 b0 -> RD.ReaderT Sched IO a6
    |
648 |        when dbg $ do sn <- liftIO$ makeStableName task
    |        ^^^^

Control/Monad/Par/Scheds/Direct.hs:648:28: error:
    • Variable not in scope:
        liftIO
          :: IO (GHC.StableName.StableName (Par a12))
             -> m0 (GHC.StableName.StableName a5)
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
648 |        when dbg $ do sn <- liftIO$ makeStableName task
    |                            ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:649:22: error:
    • Variable not in scope: liftIO :: a4 -> m0 b0
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
649 |                      liftIO$ printf " [%d] popped work %d from own queue\n" (no mysched) (hashStableName sn)
    |                      ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:654:12: error:
    Variable not in scope: when :: Bool -> a2 -> RD.ReaderT Sched IO a3
    |
654 |            when dbg$ liftIO$ printf "  + task finished successfully on cpu %d, calling reschedule continuation..\n" (no sch)
    |            ^^^^

Control/Monad/Par/Scheds/Direct.hs:654:22: error:
    • Variable not in scope: liftIO :: a1 -> a2
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
654 |            when dbg$ liftIO$ printf "  + task finished successfully on cpu %d, calling reschedule continuation..\n" (no sch)
    |                      ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:664:3: error:
    Variable not in scope: when :: Bool -> IO () -> IO a43
    |
664 |   when (dbglvl>=2)$ do tid <- myThreadId
    |   ^^^^

Control/Monad/Par/Scheds/Direct.hs:681:22: error:
    Variable not in scope: when :: Bool -> a54 -> IO a55
    |
681 |                      when dbg$ printf " [%d]  | waking up all threads\n" my_no
    |                      ^^^^

Control/Monad/Par/Scheds/Direct.hs:690:26: error:
    Variable not in scope: when :: Bool -> a52 -> IO a53
    |
690 |                          when dbg$ printf " [%d]  | shutting down\n" my_no
    |                          ^^^^

Control/Monad/Par/Scheds/Direct.hs:693:26: error:
    Variable not in scope: when :: Bool -> a50 -> IO a51
    |
693 |                          when dbg$ printf " [%d]  | woken up\n" my_no
    |                          ^^^^

Control/Monad/Par/Scheds/Direct.hs:708:10: error:
    Variable not in scope: when :: Bool -> a48 -> IO a49
    |
708 |          when (dbglvl>=2)$ printf " [%d]  | trying steal from %d\n" my_no (no schd)
    |          ^^^^

Control/Monad/Par/Scheds/Direct.hs:716:15: error:
    Variable not in scope: when :: Bool -> IO () -> IO a47
    |
716 |               when dbg$ do sn <- makeStableName task
    |               ^^^^

Control/Monad/Par/Scheds/Direct.hs:721:20: error:
    Variable not in scope:
      when :: Bool -> m3 b5 -> RD.ReaderT Sched IO a46
    |
721 |                    when dbg$ do sn <- liftIO$ makeStableName task
    |                    ^^^^

Control/Monad/Par/Scheds/Direct.hs:721:39: error:
    • Variable not in scope:
        liftIO
          :: IO (GHC.StableName.StableName (Par ()))
             -> m3 (GHC.StableName.StableName a45)
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
721 |                    when dbg$ do sn <- liftIO$ makeStableName task
    |                                       ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:722:33: error:
    • Variable not in scope: liftIO :: a44 -> m3 b5
    • Perhaps you meant one of these:
        ‘RD.liftIO’ (imported from Control.Monad.Reader),
        ‘liftA’ (imported from Control.Applicative),
        ‘liftA2’ (imported from Control.Applicative)
    |
722 |                                 liftIO$ printf " [%d]  | DONE running stolen work (unit %d) from %d\n" my_no (hashStableName sn) (no schd)
    |                                 ^^^^^^

Control/Monad/Par/Scheds/Direct.hs:863:3: error:
    Variable not in scope:
      forM_ :: [Sched] -> (Sched -> IO b4) -> IO a37
    |
863 |   forM_ allscheds $ \ Sched{no, workpool} -> do
    |   ^^^^^

Control/Monad/Par/Scheds/Direct.hs:865:6: error:
    Variable not in scope: when :: Bool -> m2 () -> IO b4
    |
865 |      when (not b) $ do
    |      ^^^^

This affects v0.3.4.7, v0.3.4.8 and v0.3.5.

As a Hackage trustee I have created revisions for these versions that should prevent users from encountering these errors. See e.g. https://hackage.haskell.org/package/monad-par-0.3.5/revisions/.

Should be this #75

Fixed and released as 0.3.6.