Skip to content

Incompatibility with GHC 9.2 although cabal bounds allow it #216

@jasagredo

Description

@jasagredo

I tried building latest main (a9900adc9e8586eeeabf3b2b4364a1c61bf42a26) with ghc-9.2 and I realise there is a build error in io-classes:stm, which I suppose is the reason why you dropped support

Configuring library 'strict-stm' for io-classes-1.8.0.0...
Preprocessing library 'strict-stm' for io-classes-1.8.0.0...
Building library 'strict-stm' for io-classes-1.8.0.0...
[1 of 7] Compiling Control.Concurrent.Class.MonadSTM.Strict.TArray ( strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TArray.hs, dist/build/strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TArray.o, dist/build/strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TArray.dyn_o )
[2 of 7] Compiling Control.Concurrent.Class.MonadSTM.Strict.TBQueue ( strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TBQueue.hs, dist/build/strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TBQueue.o, dist/build/strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TBQueue.dyn_o )

strict-stm/Control/Concurrent/Class/MonadSTM/Strict/TBQueue.hs:44:22: error:
   • Illegal equational constraint LazyTBQueue m ~ LazyTBQueue n
     (Use GADTs or TypeFamilies to permit this)
   • In the type signature:
       castStrictTBQueue :: LazyTBQueue m ~ LazyTBQueue n =>
                            StrictTBQueue m a -> StrictTBQueue n a
  |
44 | castStrictTBQueue :: LazyTBQueue m ~ LazyTBQueue n
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Error: [Cabal-7125]
Failed to build lib:strict-stm from io-classes-1.8.0.0 (which is required by test:fs-sim-test from fs-sim-0.3.1.0). See the build log above for details.

But this build error is arguably an io-classes bug that should be resolved in a patch to io-classes, either by fixing the build failure or having stricter base bounds to rule out ghc-9.2

Originally posted by @jorisdral in input-output-hk/fs-sim#101 (review)

This looks like indeed it should either be ruled out by updating the bound on base (and possibly others, see https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history) or fixing the code to compile with 9.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions