-
Notifications
You must be signed in to change notification settings - Fork 65
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
Build error against transformers-0.6 with GHC-9.0 #138
Comments
The issue seems to be https://gitlab.haskell.org/ghc/ghc/-/issues/20582 as there are two ways to solve Writing liftCallCC ::
forall (t :: (Type -> Type) -> Type -> Type) (m :: Type -> Type) (a :: Type) (b :: Type) .
(MonadTrans t, Monad m
#if !MIN_VERSION_transformers(0,6,0)
, forall (m' :: Type -> Type) . Monad m' => Monad (t m')
#endif
) =>
CallCC m (t m a) b -> CallCC (t m) a b
liftCallCC f g = join . lift . f $ \exit -> pure $ g (lift . exit . pure) seems to fix the issue, but I haven't tested that extensively. (Does As I identified the GHC issue I made a revision to mtl-2.3.1. |
but blocked on haskell/mtl#138
but blocked on haskell/mtl#138
I ran into the same issue, but also had CI succeed. I think what happens is that when testing locally whether my code compiles with transformers-0.6, I used
and thus forced its use. But on CI, because This highlights a fundamental issue with our dependency ranges: There is no (good) way to actually check on CI that the full range of allowed versions actually works! haskell/cabal#8387 would help at least with the upper end of the range, and would have caught this incompatibility before it would have hit hackage. |
@nomeata Yes, it's an issue with dependency ranges, but there is no way to do better still using some ranges. This an issue in GHC. Any library version (combination) may trigger a bug in GHC, so we cannot extrapolate using semantics of versioning system. But exhaustively checking all combinations is not realistic. So we approximate as well as we see fit. And because this is an issue in GHC, everyone can run into this issue in their code - not only EDIT: Another option is to have GHC-9.0.3, fixing the issue, but AFAIK it's not possible. |
Yes, that’s actually quite reasonable. Is it just a matter of adding
to the transformer’s cabal files, and this could be done by a hackage revision even, right? |
@nomeata Yes, and no.
if impl(ghc ==9.0.*)
build-depends: unbuildable <0 has correct one. That cannot be added via revision though currently, as the structure of Luckily, you can amend † The semantics for EDIT: there are also additional semantics where |
Ah right |
Is someone going to that, or should I raise an issue at https://github.com/haskell-infra/hackage-trustees/issues? |
That is very intrusive revision, as a trustee I won't do it. Pedantically saying, FWIW, GHC-9.2.1 and GHC-9.2.2 are also affected as the bug is fixed in ghc-9.2.3: https://www.haskell.org/ghc/blog/20220527-ghc-9.2.3-released.html (issue |
Sorry, quite right. Jumped the gun here. I'll create an issue upstream m |
I asked Ross at https://hub.darcs.net/ross/transformers/issue/90 |
I've changed my mind on this. It seems a bit drastic to block GHC 9.0 from transformers-6.0, when as @phadej says, transformers isn't actually broken here. The above fix for |
@emilypi : Currently Breakage in the wild:
|
EDIT: Doesn't happen with GHC-9.2.5 or other major versions for example, so probably some GHC bug?
I'm not making revision without knowing what is the cause of this problem.
Note:
mtl-2.3
is compiling fine with GHC-9.0. So there's some change inmtl-2.3.1
which triggered this. EDIT: liftCallCC was added in mtl-2.3.1The text was updated successfully, but these errors were encountered: