ghc-cabal fails to build with recent Cabal master
Observed in https://gitlab.haskell.org/sjakobi/ghc/-/jobs/76255
utils/ghc-cabal/Main.hs:277:33: error:
• Couldn't match expected type ‘IO (Maybe FilePath)’
with actual type ‘FilePath -> IO (Maybe FilePath)’
• Probable cause: ‘findHookedPackageDesc’ is applied to too few arguments
In the first argument of ‘(<|>)’, namely
‘findHookedPackageDesc (cwd </> distdir </> "build")’
In a stmt of a 'do' block:
maybe_infoFile <- findHookedPackageDesc
(cwd </> distdir </> "build")
<|> defaultHookedPackageDesc
In the expression:
do cwd <- getCurrentDirectory
maybe_infoFile <- findHookedPackageDesc
(cwd </> distdir </> "build")
<|> defaultHookedPackageDesc
case maybe_infoFile of
Nothing -> return emptyHookedBuildInfo
Just infoFile -> readHookedBuildInfo verbosity infoFile
|
277 | maybe_infoFile <- findHookedPackageDesc (cwd </> distdir </> "build")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
utils/ghc-cabal/Main.hs:277:56: error:
• Couldn't match type ‘[Char]’ with ‘Verbosity’
Expected type: Verbosity
Actual type: FilePath
• In the first argument of ‘findHookedPackageDesc’, namely
‘(cwd </> distdir </> "build")’
In the first argument of ‘(<|>)’, namely
‘findHookedPackageDesc (cwd </> distdir </> "build")’
In a stmt of a 'do' block:
maybe_infoFile <- findHookedPackageDesc
(cwd </> distdir </> "build")
<|> defaultHookedPackageDesc
|
277 | maybe_infoFile <- findHookedPackageDesc (cwd </> distdir </> "build")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
utils/ghc-cabal/Main.hs:278:37: error:
• Variable not in scope:
defaultHookedPackageDesc :: IO (Maybe FilePath)
• Perhaps you meant one of these:
‘defaultPackageDesc’ (imported from Distribution.Simple.Utils),
‘findHookedPackageDesc’ (imported from Distribution.Simple.Utils)
|
278 | <|> defaultHookedPackageDesc
| ^^^^^^^^^^^^^^^^^^^^^^^^
utils/ghc-cabal/Main.hs:310:49: error:
• Variable not in scope: libModules :: Library -> b
• Perhaps you meant one of these:
‘exeModules’ (imported from Distribution.PackageDescription),
‘allLibModules’ (imported from Distribution.Simple.LocalBuildInfo)
|
310 | libBiModules lib = (libBuildInfo lib, libModules lib)
| ^^^^^^^^^^
utils/ghc-cabal/Main.hs:350:31: error:
Variable not in scope:
externalPackageDeps :: LocalBuildInfo -> [(a0, b)]
|
350 | dep_ids = map snd (externalPackageDeps lbi)
| ^^^^^^^^^^^^^^^^^^^
utils/ghc-cabal/Main.hs:356:26: error:
Variable not in scope:
externalPackageDeps :: LocalBuildInfo -> [(UnitId, b0)]
|
356 | . externalPackageDeps
| ^^^^^^^^^^^^^^^^^^^