suhailshergill / extensible-effects

Extensible Effects: An Alternative to Monad Transformers
https://hackage.haskell.org/package/extensible-effects
MIT License
175 stars 25 forks source link

GHC 7.10.1 errors in version on hackage #46

Closed rrnewton closed 9 years ago

rrnewton commented 9 years ago

I'm actually a bit confused that #34 implies that the package does build on ghc 7.10.1 (albeit with warnings). I see the following error instead:

[10 of 20] Compiling Control.Eff.Cut  ( src/Control/Eff/Cut.hs, dist/dist-sandbox-6b04e7fe/build/Control/Eff/Cut.o )

src/Control/Eff/Cut.hs:70:2:
    Illegal equational constraint Data.OpenUnion.Internal.OpenUnion2.Member'
                                    Choose r
                                  ~ 'True
    (Use GADTs or TypeFamilies to permit this)
    When checking that ‘loop’ has the inferred type
      loop :: forall r a.
              (Data.OpenUnion.Internal.OpenUnion2.Member' Choose r ~ 'True) =>
              [Eff (Exc CutFalse :> r) a]
              -> Free (Union (Exc CutFalse :> r)) a -> Eff r a
    In an equation for ‘call’:
        call
          = loop []
          where
              loop jq
                = freeMap
                    (\ x -> return x `mplus'` next jq)
                    (\ u
                       -> case decomp u of {
                            Right (Exc CutFalse) -> ...
                            Left u' -> ... })
              check ::
                Member Choose r =>
                [Eff (Exc CutFalse :> r) a]
                -> Union r (Eff (Exc CutFalse :> r) a) -> Eff r a
              check jq u | Just (Choose [] _) <- prj u = next jq
              check jq u | Just (Choose [x] k) <- prj u = loop jq (k x)
              check jq u | Just (Choose lst k) <- prj u = next $ map k lst ++ jq
              check jq u = send u >>= loop jq
              next :: Member Choose r => [Eff (Exc CutFalse :> r) a] -> Eff r a
              ....
Failed to install extensible-effects-1.9.1.1

And then adding LANGUAGE GADTs to that module then leaves a whole bunch of other "Could not deduce" errors.

suhailshergill commented 9 years ago

@rrnewton i don't believe adding LANGUAGE GADTs is the right thing to do there. i don't have ghc 7.10.1 installed, but could you confirm that you ran the build against the compat/ghc-7.10 branch?

rrnewton commented 9 years ago

Thanks, I wasn't aware of the branch! Any reason it's not merged yet?

(Closing this as "already fixed".)

suhailshergill commented 9 years ago

@rrnewton waiting on travis-ci builds to be available. if there's a need, i can do a merge and deploy later today. let me know

fosskers commented 9 years ago

I was hoping to experiment with this library but am seeing these build errors with 7.10. I'd say there's a need ;)

suhailshergill commented 9 years ago

@fosskers @rrnewton when #47 gets merged into master (plan to tonight), it'll be available on hackage

joneshf commented 9 years ago

:+1:

suhailshergill commented 9 years ago

so i fixed the issues and version 1.9.2.1 is compatible with ghc (merged into master as per #47). sadly i get the following error when i try to upload to hackage:

Uploading dist/extensible-effects-1.9.2.1.tar.gz...
Error: dist/extensible-effects-1.9.2.1.tar.gz: 400 Bad Request
Error: Invalid package

'ghc-options: -Wall -Werror' makes the package very easy to break with future
GHC versions because new GHC versions often add new warnings. Use just
'ghc-options: -Wall' instead.

this is odd because -Werror is being guarded by a flag whose default is False. i'll try again later in the evening to see what the issue is

suhailshergill commented 9 years ago

thanks to @dolio the current problem is a symptom of haskell/cabal#2527. as a workaround, till the issue is resolved, i'll create another minor release (which is patched appropriately) and upload that. reopening the issue to track hackage upload