Closed l29ah closed 1 year ago
Plenty of Variable not in scope errors in cabal/cabal-install-solver:
Variable not in scope
cabal/cabal-install-solver
[28 of 50] Compiling Distribution.Solver.Modular.Linking ( cabal/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs, /home/l29ah/projects/hackport/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hackport-0.8.4.0/l/hackport-external-libs-cabal-install-solver/build/hackport-external-libs-cabal-install-solver/Distribution/Solver/Modular/Linking.o, /home/l29ah/projects/hackport/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hackport-0.8.4.0/l/hackport-external-libs-cabal-install-solver/build/hackport-external-libs-cabal-install-solver/Distribution/Solver/Modular/Linking.dyn_o ) cabal/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs:245:10: error: [GHC-88464] Variable not in scope: zipWithM_ :: (FlaggedDep QPN -> FlaggedDep QPN -> UpdateState ()) -> FlaggedDeps QPN -> FlaggedDeps QPN -> UpdateState () Suggested fix: Perhaps use one of these: ‘zipWith’ (imported from Distribution.Solver.Compat.Prelude), ‘zipWith3’ (imported from Distribution.Solver.Compat.Prelude) | 245 | go = zipWithM_ go1 | ^^^^^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs:306:5: error: [GHC-88464] Variable not in scope: forM_ :: [PackagePath] -> (PackagePath -> UpdateState ()) -> UpdateState () Suggested fix: Perhaps use one of these: ‘T.forM’ (imported from Data.Traversable), ‘for_’ (imported from Distribution.Solver.Compat.Prelude) | 306 | forM_ (S.toList linkedTo) $ \pp' -> linkDeps (Q pp' pn) newDeps | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs:353:9: error: [GHC-88464] Variable not in scope: forM_ :: [Flag] -> (Distribution.Types.Flag.FlagName -> UpdateState ()) -> UpdateState a0 Suggested fix: Perhaps use one of these: ‘T.forM’ (imported from Data.Traversable), ‘for_’ (imported from Distribution.Solver.Compat.Prelude) | 353 | forM_ flags $ \fn -> do | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs:356:9: error: [GHC-88464] Variable not in scope: forM_ :: [OptionalStanza] -> (OptionalStanza -> UpdateState ()) -> UpdateState () Suggested fix: Perhaps use one of these: ‘T.forM’ (imported from Data.Traversable), ‘for_’ (imported from Distribution.Solver.Compat.Prelude) | 356 | forM_ stanzas $ \sn -> do | ^^^^^ [31 of 50] Compiling Distribution.Solver.Modular.Validate ( cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs, /home/l29ah/projects/hackport/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hackport-0.8.4.0/l/hackport-external-libs-cabal-install-solver/build/hackport-external-libs-cabal-install-solver/Distribution/Solver/Modular/Validate.o, /home/l29ah/projects/hackport/dist-newstyle/build/x86_64-linux/ghc-9.6.2/hackport-0.8.4.0/l/hackport-external-libs-cabal-install-solver/build/hackport-external-libs-cabal-install-solver/Distribution/Solver/Modular/Validate.dyn_o ) cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:268:12: error: [GHC-88464] Variable not in scope: liftM2 :: (a1 -> b1 -> (a1, b1)) -> Either Conflict PPreAssignment -> Either Conflict (Map QPN ComponentDependencyReasons) -> Either (ConflictSet, FailReason) (PPreAssignment, Map QPN ComponentDependencyReasons) Suggested fix: Perhaps use one of these: ‘liftA2’ (imported from Prelude), ‘lift’ (imported from Control.Monad.Reader), ‘liftIO’ (imported from Control.Monad.Reader) | 268 | case liftM2 (,) mnppa mNewRequiredComps of | ^^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:298:12: error: [GHC-88464] Variable not in scope: liftM2 :: (a0 -> b0 -> (a0, b0)) -> Either Conflict PPreAssignment -> Either Conflict (Map QPN ComponentDependencyReasons) -> Either (ConflictSet, FailReason) (PPreAssignment, Map QPN ComponentDependencyReasons) Suggested fix: Perhaps use one of these: ‘liftA2’ (imported from Prelude), ‘lift’ (imported from Control.Monad.Reader), ‘liftIO’ (imported from Control.Monad.Reader) | 298 | case liftM2 (,) mnppa mNewRequiredComps of | ^^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:347:44: error: [GHC-88464] Variable not in scope: mzero :: [LDep QPN] | 347 | Nothing -> mzero | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:351:44: error: [GHC-88464] Variable not in scope: mzero :: [LDep QPN] | 351 | Nothing -> mzero | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:365:33: error: [GHC-88464] Variable not in scope: mzero :: [LDep QPN] | 365 | Simple _ _ -> mzero | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:369:49: error: [GHC-88464] Variable not in scope: mzero :: [LDep QPN] | 369 | Nothing -> mzero | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:375:49: error: [GHC-88464] Variable not in scope: mzero :: [LDep QPN] | 375 | Nothing -> mzero | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:397:63: error: [GHC-88464] Variable not in scope: foldM :: (PPreAssignment -> LDep QPN -> Either Conflict PPreAssignment) -> PPreAssignment -> [LDep QPN] -> Either Conflict PPreAssignment Suggested fix: Perhaps use one of these: ‘S.fold’ (imported from Data.Set), ‘foldl’ (imported from Prelude), ‘S.foldl’ (imported from Data.Set) | 397 | extend extSupported langSupported pkgPresent newactives ppa = foldM extendSingle ppa newactives | ^^^^^ cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs:539:43: error: [GHC-88464] Variable not in scope: foldM :: (Map QPN ComponentDependencyReasons -> LDep QPN -> Either Conflict (Map QPN ComponentDependencyReasons)) -> Map QPN ComponentDependencyReasons -> [LDep QPN] -> Either Conflict (Map QPN ComponentDependencyReasons) Suggested fix: Perhaps use one of these: ‘S.fold’ (imported from Data.Set), ‘foldl’ (imported from Prelude), ‘S.foldl’ (imported from Data.Set) | 539 | extendRequiredComponents eqpn available = foldM extendSingle | ^^^^^
https://github.com/gentoo-haskell/cabal/blob/292d4e6d43a976c008b727a0e34b1f47eda3ff66/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs#L14-L15
Didn't these modules used to re-export Control.Monad? Maybe something changed with the new version of mtl.
Control.Monad
mtl
Yep, that is the issue.
Remove re-exports of Control.Monad, Control.Monad.Fix and Data.Monoid modules
Plenty of
Variable not in scope
errors incabal/cabal-install-solver
: