simonmar / monad-par

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

monad-par-0.3.4.8 test suite does not compile with ghc-8.6.1

peti opened this issue · comments

I get several errors of the following kind:

tests/ParTests_shared.hs:88:7: error:
    • No instance for (Control.Monad.Fail.MonadFail Par)
        arising from a do statement
        with the failable pattern ‘[a, b, c, d]’
    • In a stmt of a 'do' block:
        [a, b, c, d] <- sequence [new, new, new, new]
      In the second argument of ‘($)’, namely
        ‘do [a, b, c, d] <- sequence [new, new, ....]
            fork
              $ do x <- get a
                   put b (x + 1)
            fork
              $ do x <- get a
                   put c (x + 2)
            fork
              $ do x <- get b
                   y <- get c
                   ....
            ....’
      In the expression:
        runPar
          $ do [a, b, c, d] <- sequence [new, new, ....]
               fork
                 $ do x <- get a
                      put b (x + 1)
               fork
                 $ do x <- get a
                      put c (x + 2)
               fork
                 $ do x <- get b
                      y <- get c
                      ....
               ....
   |
88 |       [a,b,c,d] <- sequence [new,new,new,new]
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~

@simonmar, can you upload a new version of monad-par with these changes?

Thanks!