haskellcabalcabal-install

Cabal - Installing beam-migrate


I'm trying to install beam-migrate dependency and it fails with the following error:

Configuring library for beam-migrate-0.5.0.0..
Preprocessing library for beam-migrate-0.5.0.0..
Building library for beam-migrate-0.5.0.0..
[ 1 of 20] Compiling Database.Beam.Migrate.SQL.SQL92 ( Database/Beam/Migrate/SQL/SQL92.hs, dist/build/Database/Beam/Migrate/SQL/SQL92.o )
[ 2 of 20] Compiling Database.Beam.Migrate.Types.Predicates ( Database/Beam/Migrate/Types/Predicates.hs, dist/build/Database/Beam/Migrate/Types/Predicates.o )
[ 3 of 20] Compiling Database.Beam.Migrate.SQL.Types ( Database/Beam/Migrate/SQL/Types.hs, dist/build/Database/Beam/Migrate/SQL/Types.o )
[ 4 of 20] Compiling Database.Beam.Migrate.Serialization ( Database/Beam/Migrate/Serialization.hs, dist/build/Database/Beam/Migrate/Serialization.o )
[ 5 of 20] Compiling Database.Beam.Migrate.Checks ( Database/Beam/Migrate/Checks.hs, dist/build/Database/Beam/Migrate/Checks.o )
[ 6 of 20] Compiling Database.Beam.Migrate.Generics.Tables ( Database/Beam/Migrate/Generics/Tables.hs, dist/build/Database/Beam/Migrate/Generics/Tables.o )
[ 7 of 20] Compiling Database.Beam.Migrate.Types.CheckedEntities ( Database/Beam/Migrate/Types/CheckedEntities.hs, dist/build/Database/Beam/Migrate/Types/CheckedEntities.o )
[ 8 of 20] Compiling Database.Beam.Migrate.Types ( Database/Beam/Migrate/Types.hs, dist/build/Database/Beam/Migrate/Types.o )
[ 9 of 20] Compiling Database.Beam.Migrate.SQL.Tables ( Database/Beam/Migrate/SQL/Tables.hs, dist/build/Database/Beam/Migrate/SQL/Tables.o )

Database/Beam/Migrate/SQL/Tables.hs:32:5: warning: [-Wdodgy-exports]
    The export item ‘IsNotNull(..)’ suggests that
    ‘IsNotNull’ has (in-scope) constructors or class methods,
    but it has none
   |
32 |   , IsNotNull(..)
   |     ^^^^^^^^^^^^^
[10 of 20] Compiling Database.Beam.Migrate.SQL.BeamExtensions ( Database/Beam/Migrate/SQL/BeamExtensions.hs, dist/build/Database/Beam/Migrate/SQL/BeamExtensions.o )
[11 of 20] Compiling Database.Beam.Migrate.SQL ( Database/Beam/Migrate/SQL.hs, dist/build/Database/Beam/Migrate/SQL.o )
[12 of 20] Compiling Database.Beam.Migrate.SQL.Builder ( Database/Beam/Migrate/SQL/Builder.hs, dist/build/Database/Beam/Migrate/SQL/Builder.o )
[13 of 20] Compiling Database.Beam.Migrate.Generics.Types ( Database/Beam/Migrate/Generics/Types.hs, dist/build/Database/Beam/Migrate/Generics/Types.o )
[14 of 20] Compiling Database.Beam.Migrate.Generics ( Database/Beam/Migrate/Generics.hs, dist/build/Database/Beam/Migrate/Generics.o )
[15 of 20] Compiling Database.Beam.Haskell.Syntax ( Database/Beam/Haskell/Syntax.hs, dist/build/Database/Beam/Haskell/Syntax.o )

Database/Beam/Haskell/Syntax.hs:1041:10: error:
    Duplicate instance declarations:
      instance Hashable a => Hashable (S.Set a)
        -- Defined at Database/Beam/Haskell/Syntax.hs:1041:10
      instance Hashable v => Hashable (S.Set v)
        -- Defined in ‘hashable-1.3.5.0:Data.Hashable.Class’
     |
1041 | instance Hashable a => Hashable (S.Set a) where
     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build beam-migrate-0.5.0.0 

Solution

  • beam-migrate-0.5.0.0 is incompatible with hashable-1.3.5.0. Either upgrade to beam-migrate-0.5.1.0 (preferred), or downgrade to hashable-1.3.3.0.