Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

free-5 doesn't build on old GHCs with transformers-0.4 #170

Closed
RyanGlScott opened this issue Mar 7, 2018 · 3 comments
Closed

free-5 doesn't build on old GHCs with transformers-0.4 #170

RyanGlScott opened this issue Mar 7, 2018 · 3 comments

Comments

@RyanGlScott
Copy link
Collaborator

As noticed in this Travis build.

$ cabal new-build -w /opt/ghc/7.8.4/bin/ghc --constraint=transformers==0.4.3.0
Resolving dependencies...
In order, the following will be built (use -v for more details):
 - free-5 (lib) (first run)
Preprocessing library for free-5..
Building library for free-5..
[ 9 of 20] Compiling Control.Monad.Trans.Free.Church ( src/Control/Monad/Trans/Free/Church.hs, /home/rgscott/Documents/Hacking/Haskell/free/dist-newstyle/build/x86_64-linux/ghc-7.8.4/free-5/build/Control/Monad/Trans/Free/Church.o ) [Control.Monad.Cont.Class changed]

src/Control/Monad/Trans/Free/Church.hs:84:13:
    Could not deduce (Functor m) arising from a use of ‘eq1’
    from the context (Functor f, Monad m, Eq1 f, Eq1 m)
      bound by the instance declaration
      at src/Control/Monad/Trans/Free/Church.hs:83:10-59
    or from (Eq a)
      bound by the type signature for
                 eq1 :: Eq a => FT f m a -> FT f m a -> Bool
      at src/Control/Monad/Trans/Free/Church.hs:84:3-5
    Possible fix:
      add (Functor m) to the context of
        the type signature for eq1 :: Eq a => FT f m a -> FT f m a -> Bool
        or the instance declaration
    In the expression: eq1 (fromFT x) (fromFT y)
    In an equation for ‘eq1’: eq1 x y = eq1 (fromFT x) (fromFT y)
    In the instance declaration for ‘Eq1 (FT f m)’

src/Control/Monad/Trans/Free/Church.hs:87:18:
    Could not deduce (Functor m) arising from a use of ‘compare1’
    from the context (Eq1 (FT f m), Functor f, Monad m, Ord1 f, Ord1 m)
      bound by the instance declaration
      at src/Control/Monad/Trans/Free/Church.hs:86:10-62
    or from (Ord a)
      bound by the type signature for
                 compare1 :: Ord a => FT f m a -> FT f m a -> Ordering
      at src/Control/Monad/Trans/Free/Church.hs:87:3-10
    Possible fix:
      add (Functor m) to the context of
        the type signature for
          compare1 :: Ord a => FT f m a -> FT f m a -> Ordering
        or the instance declaration
    In the expression: compare1 (fromFT x) (fromFT y)
    In an equation for ‘compare1’:
        compare1 x y = compare1 (fromFT x) (fromFT y)
    In the instance declaration for ‘Ord1 (FT f m)’
@hvr
Copy link
Collaborator

hvr commented Mar 8, 2018

@RyanGlScott are hackage revisions needed?

@RyanGlScott
Copy link
Collaborator Author

Maybe. But I can't possibly fathom what the revision would need to be, as this error was an obscure combination of transformers, base, and GHC.

In any case, this point is a bit moot now that free-5.0.1 has been released, which has the same version bounds as free-5 does.

@hvr
Copy link
Collaborator

hvr commented Aug 12, 2018

@RyanGlScott unfortunately it isn't completely moot... nor does free-5.0.1 have the same bounds as free-5... and so I noticed install-plans where the solver was justified to backtrack into free-5 rather than free-5.0.1

So the way I understand it, the configuration that needs to be excluded is

  • free == 5
  • transformers == 0.4.*
  • base < 4.8

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants