Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

union-find-0.2 does not build with GHC 9.4 #14

Open
andreasabel opened this issue Dec 27, 2022 · 3 comments
Open

union-find-0.2 does not build with GHC 9.4 #14

andreasabel opened this issue Dec 27, 2022 · 3 comments

Comments

@andreasabel
Copy link

andreasabel commented Dec 27, 2022

In base-4.17, the MonadFail instance for ST was removed:

$ cabal build
Build profile: -w ghc-9.4.4 -O1
In order, the following will be built (use -v for more details):
 - union-find-0.2 (lib:union-find) (first run)
...
src/Data/UnionFind/ST.hs:133:5: error:
    • No instance for (MonadFail (ST s))
        arising from a do statement
        with the failable pattern ‘Info info_ref1’
    • In a stmt of a 'do' block: Info info_ref1 <- readSTRef link_ref1
      In the second argument of ‘($)’, namely
        ‘do Info info_ref1 <- readSTRef link_ref1
            Info info_ref2 <- readSTRef link_ref2
            MkInfo w1 d1 <- readSTRef info_ref1
            MkInfo w2 d2 <- readSTRef info_ref2
            ....’
      In a stmt of a 'do' block:
        when (point1 /= point2)
          $ do Info info_ref1 <- readSTRef link_ref1
               Info info_ref2 <- readSTRef link_ref2
               MkInfo w1 d1 <- readSTRef info_ref1
               MkInfo w2 d2 <- readSTRef info_ref2
               ....

Lifted from:

In my role as Hackage Trustee, I revised base to <4.17: https://hackage.haskell.org/package/union-find-0.2/revisions/

@andreasabel
Copy link
Author

grim-reaper-ghc-9 4

@bergmark
Copy link

I'm getting a different error:

src/Ignore/Types.hs:30:10: error:
    • No instance for (Semigroup FileIgnoredChecker)
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid FileIgnoredChecker’
   |
30 | instance Monoid FileIgnoredChecker where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^

@andreasabel
Copy link
Author

The steps to the error I see are:

cabal get union-find
cd union-find-2.0
cabal build -w ghc-9.4.4 --allow-newer=union-find:base

GuillaumedeVolpiano added a commit to GuillaumedeVolpiano/union-find that referenced this issue Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants