ekmett / adjunctions

Simple adjunctions
http://hackage.haskell.org/package/adjunctions
Other
44 stars 27 forks source link

Build issues with 7.8.4 and adjunctions 4.3 #20

Closed tmcgilchrist closed 8 years ago

tmcgilchrist commented 8 years ago

The latest version of adjunctions (4.3) fails to build for me with the following error:

Preprocessing library adjunctions-4.3...
[ 1 of 11] Compiling Data.Functor.Contravariant.Rep ( src/Data/Functor/Contravariant/Rep.hs, dist/dist-sandbox-fffe542f/build/Data/Functor/Contravariant/Rep.o )
[ 2 of 11] Compiling Control.Monad.Trans.Conts ( src/Control/Monad/Trans/Conts.hs, dist/dist-sandbox-fffe542f/build/Control/Monad/Trans/Conts.o )
[ 3 of 11] Compiling Data.Functor.Contravariant.Adjunction ( src/Data/Functor/Contravariant/Adjunction.hs, dist/dist-sandbox-fffe542f/build/Data/Functor/Contravariant/Adjunction.o )
[ 4 of 11] Compiling Control.Monad.Trans.Contravariant.Adjoint ( src/Control/Monad/Trans/Contravariant/Adjoint.hs, dist/dist-sandbox-fffe542f/build/Control/Monad/Trans/Contravariant/Adjoint.o )
[ 5 of 11] Compiling Data.Functor.Rep ( src/Data/Functor/Rep.hs, dist/dist-sandbox-fffe542f/build/Data/Functor/Rep.o )

src/Data/Functor/Rep.hs:234:10:
    No instance for (Distributive Dual)
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Representable Dual’

src/Data/Functor/Rep.hs:239:10:
    No instance for (Distributive Monoid.Product)
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Representable Monoid.Product’

src/Data/Functor/Rep.hs:244:10:
    No instance for (Distributive Sum)
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Representable Sum’

src/Data/Functor/Rep.hs:250:10:
    No instance for (Distributive Complex)
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Representable Complex’

The previous version 4.2.2 doesn't have this issue, locking to 4.2.2 in the cabal file works. Using 7.8.4 with base-4.7.0.2.

It appears that the lines it's complaining about were recently added. I'm not very familiar with this package but perhaps it's expecting newer versions of these classes than what I've got. Diff between v4.2.2 and v4.3

RyanGlScott commented 8 years ago

Sorry, this was an unfortunate oversight. adjunctions-4.3 needs distributive-0.5 or later to build properly, since that was when those missing instances you see were introduced.

The version bounds on Hackage should have been retrofitted pretty recently. Can you try this:

ghc-pkg unregister distributive
cabal update
cabal install adjunctions

and see if it works?

tmcgilchrist commented 8 years ago

Had to do something slightly different, using sandboxes, but yes it does work now. Must have got a copy of the package before the latest upload to 4.3 on hackage.