jwiegley / async-pool

Other
21 stars 13 forks source link

Build failure with up-to-date dependencies on GHC 7.6.3 #5

Closed ozataman closed 9 years ago

ozataman commented 9 years ago

I've run into the failure below; I think the culprit may be the monad-control stack. I also noticed there are no bounds on dependencies: I would (personally) recommend maintaining strict lower and upper-bounds on all dependencies since async-pool depends on a few non-trivial packages.

➜  ~  ci async-pool
Resolving dependencies...
Downloading fgl-5.5.1.0...
Configuring fgl-5.5.1.0...
Building fgl-5.5.1.0...
Installed fgl-5.5.1.0
Downloading async-pool-0.8.0...
Configuring async-pool-0.8.0...
Building async-pool-0.8.0...
Failed to install async-pool-0.8.0
Build log ( /Users/ozataman/.cabal/logs/async-pool-0.8.0.log ):
Configuring async-pool-0.8.0...
Building async-pool-0.8.0...
Preprocessing library async-pool-0.8.0...
[1 of 3] Compiling Control.Concurrent.Async.Pool.Async ( Control/Concurrent/Async/Pool/Async.hs, dist/build/Control/Concurrent/Async/Pool/Async.o )
[2 of 3] Compiling Control.Concurrent.Async.Pool.Internal ( Control/Concurrent/Async/Pool/Internal.hs, dist/build/Control/Concurrent/Async/Pool/Internal.o )

Control/Concurrent/Async/Pool/Internal.hs:256:33:
    Could not deduce (StM m b ~ StM m a0)
    from the context (Foldable t, Monoid b, MonadBaseControl IO m)
      bound by the type signature for
                 scatterFoldMapM :: (Foldable t, Monoid b, MonadBaseControl IO m) =>
                                    TaskGroup -> t (IO a) -> (Either SomeException a -> m b) -> m b
      at Control/Concurrent/Async/Pool/Internal.hs:(250,20)-(251,82)
    NB: `StM' is a type function, and may not be injective
    The type variable `a0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Expected type: IO (StM m b)
      Actual type: IO (StM m a0)
    In the second argument of `loop', namely `(run $ return mempty)'
    In the expression: loop run (run $ return mempty) (toList hs)
    In the second argument of `($)', namely
      `\ run -> loop run (run $ return mempty) (toList hs)'
Updating documentation index
/Users/ozataman/.cabal/share/doc/x86_64-osx-ghc-7.6.3/index.html
cabal: Error: some packages failed to install:
async-pool-0.8.0 failed during the building phase. The exception was:
ExitFailure 1
jwiegley commented 9 years ago

@ozataman You are right on both counts. I'll upgrade the count to work with monad-control 1.0, and then set stricter bounds.

ozataman commented 9 years ago

Thank you! We have a couple of situations where async-pool seems like it'd be the perfect fit. Looking forward to it!

jwiegley commented 9 years ago

Does 0.9.0 solve your issue?

jwiegley commented 9 years ago

Pinging @ozataman