Skip to content

yesod-bin-1.6.2.3 does not compile #1859

@vitaliel

Description

@vitaliel

Hi, I tried to install yesod to generate a new project, but it fails to compile with ghc-9.4.8 and ghc-9.8.2

$ cabal install yesod-bin
Resolving dependencies...
Build profile: -w ghc-9.4.8 -O1
In order, the following will be built (use -v for more details):
 - yesod-bin-1.6.2.3 (exe:yesod) (requires build)
Starting     yesod-bin-1.6.2.3 (exe:yesod)
Building     yesod-bin-1.6.2.3 (exe:yesod)

Failed to build exe:yesod from yesod-bin-1.6.2.3.
Build log (
/home/lz/.cabal/logs/ghc-9.4.8/yesod-bin-1.6.2.3-e-yesod-939d1ba02846fce2147892c6b04b1f3e05d5719fdfecfd69ff2c3d2f33fc0efc.log
):
Configuring executable 'yesod' for yesod-bin-1.6.2.3...
Preprocessing executable 'yesod' for yesod-bin-1.6.2.3...
Building executable 'yesod' for yesod-bin-1.6.2.3...
[1 of 7] Compiling AddHandler       ( AddHandler.hs, dist/build/yesod/yesod-tmp/AddHandler.o )

AddHandler.hs:249:41: error:
    • Couldn't match expected type: IO
                                      Distribution.Types.GenericPackageDescription.GenericPackageDescription
                  with actual type: SymbolicPath Pkg 'File
                                    -> IO
                                         Distribution.Types.GenericPackageDescription.GenericPackageDescription
    • Probable cause: ‘readGenericPackageDescription’ is applied to too few arguments
      In the second argument of ‘(<$>)’, namely
        ‘readGenericPackageDescription normal cabal’
      In a stmt of a 'do' block:
        pd <- flattenPackageDescription
                <$> readGenericPackageDescription normal cabal
      In the expression:
        do pd <- flattenPackageDescription
                   <$> readGenericPackageDescription normal cabal
           let buildInfo = allBuildInfo pd
               srcDirs = concatMap hsSourceDirs buildInfo
           return $ maybe "." getSymbolicPath $ listToMaybe srcDirs
    |
249 |     pd <- flattenPackageDescription <$> readGenericPackageDescription normal cabal
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

AddHandler.hs:249:78: error:
    • Couldn't match type: [Char]
                     with: Maybe (SymbolicPath CWD ('Dir Pkg))
      Expected: Maybe (SymbolicPath CWD ('Dir Pkg))
        Actual: FilePath
    • In the second argument of ‘readGenericPackageDescription’, namely
        ‘cabal’
      In the second argument of ‘(<$>)’, namely
        ‘readGenericPackageDescription normal cabal’
      In a stmt of a 'do' block:
        pd <- flattenPackageDescription
                <$> readGenericPackageDescription normal cabal
    |
249 |     pd <- flattenPackageDescription <$> readGenericPackageDescription normal cabal
    |                                                                              ^^^^^
[2 of 7] Compiling Devel            ( Devel.hs, dist/build/yesod/yesod-tmp/Devel.o, dist/build/yesod/yesod-tmp/Devel.dyn_o )

Devel.hs:304:15: error:
    • Couldn't match expected type: IO D.GenericPackageDescription
                  with actual type: Distribution.Utils.Path.SymbolicPath
                                      Distribution.Utils.Path.Pkg 'Distribution.Utils.Path.File
                                    -> IO D.GenericPackageDescription
    • Probable cause: ‘D.readGenericPackageDescription’ is applied to too few arguments
      In a stmt of a 'do' block:
        gpd <- D.readGenericPackageDescription D.normal cabal
      In the expression:
        do unlessM (checkPort $ develPort opts)
             $ error "devel port unavailable"
           unlessM (checkPort $ develTlsPort opts)
             $ error "devel TLS port unavailable"
           say "Yesod devel server. Enter 'quit' or hit Ctrl-C to quit."
           cabal <- D.tryFindPackageDesc D.silent "."
           ....
      In an equation for ‘devel’:
          devel opts passThroughArgs
            = do unlessM (checkPort $ develPort opts)
                   $ error "devel port unavailable"
                 unlessM (checkPort $ develTlsPort opts)
                   $ error "devel TLS port unavailable"
                 say "Yesod devel server. Enter 'quit' or hit Ctrl-C to quit."
                 ....
            where
                sayV = when (verbose opts) . sayString
                runStackBuild :: TVar Int -> [Char] -> Set.Set [Char] -> IO ()
                runStackBuild appPortVar packageName availableFlags
                  = do myPath <- getExecutablePath
                       ....
                withChangedVar :: (TVar Bool -> IO a) -> IO a
                ....
    |
304 |     gpd    <- D.readGenericPackageDescription D.normal cabal
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Devel.hs:304:56: error:
    • Couldn't match type: Distribution.Utils.Path.SymbolicPathX
                             'Distribution.Utils.Path.OnlyRelative
                             Distribution.Utils.Path.Pkg
                             'Distribution.Utils.Path.File
                     with: Maybe
                             (Distribution.Utils.Path.SymbolicPath
                                Distribution.Utils.Path.CWD
                                ('Distribution.Utils.Path.Dir Distribution.Utils.Path.Pkg))
      Expected: Maybe
                  (Distribution.Utils.Path.SymbolicPath
                     Distribution.Utils.Path.CWD
                     ('Distribution.Utils.Path.Dir Distribution.Utils.Path.Pkg))
        Actual: Distribution.Utils.Path.RelativePath
                  Distribution.Utils.Path.Pkg 'Distribution.Utils.Path.File
    • In the second argument of ‘D.readGenericPackageDescription’, namely
        ‘cabal’
      In a stmt of a 'do' block:
        gpd <- D.readGenericPackageDescription D.normal cabal
      In the expression:
        do unlessM (checkPort $ develPort opts)
             $ error "devel port unavailable"
           unlessM (checkPort $ develTlsPort opts)
             $ error "devel TLS port unavailable"
           say "Yesod devel server. Enter 'quit' or hit Ctrl-C to quit."
           cabal <- D.tryFindPackageDesc D.silent "."
           ....
    |
304 |     gpd    <- D.readGenericPackageDescription D.normal cabal
    |                                                        ^^^^^
[3 of 7] Compiling HsFile           ( HsFile.hs, dist/build/yesod/yesod-tmp/HsFile.o )

HsFile.hs:7:1: warning: [-Wunused-imports]
    The import of ‘Control.Monad.IO.Class’ is redundant
      except perhaps to import instances from ‘Control.Monad.IO.Class’
    To import instances alone, use: import Control.Monad.IO.Class()
  |
7 | import Control.Monad.IO.Class (liftIO)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[4 of 7] Compiling Keter            ( Keter.hs, dist/build/yesod/yesod-tmp/Keter.o )

Keter.hs:21:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
21 | import Data.Monoid
   | ^^^^^^^^^^^^^^^^^^

Keter.hs:42:15: warning: [-Wdeprecations]
    In the use of ‘decodeFile’ (imported from Data.Yaml):
    Deprecated: "Please use decodeFileEither, which does not confused type-directed and runtime exceptions."
   |
42 |     mvalue <- decodeFile ketercfg
   |               ^^^^^^^^^^
[5 of 7] Compiling Options          ( Options.hs, dist/build/yesod/yesod-tmp/Options.o )

Options.hs:17:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
17 | import           Data.Monoid
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Options.hs:94:5: warning: [-Wunused-local-binds]
    Defined but not used: ‘cmdMap’
   |
94 |     cmdMap f cmds =
   |     ^^^^^^

Options.hs:96:21: warning: [-Wincomplete-uni-patterns]
    Pattern match(es) are non-exhaustive
    In a pattern binding:
        Patterns of type ‘Maybe (ParserInfo a)’ not matched: Nothing
   |
96 |                 let (Just parseri) = f cmd
   |                     ^^^^^^^^^^^^^^^^^^^^^^
[6 of 7] Compiling Paths_yesod_bin  ( dist/build/yesod/autogen/Paths_yesod_bin.hs, dist/build/yesod/yesod-tmp/Paths_yesod_bin.o )
Error: [Cabal-7125]
Failed to build exe:yesod from yesod-bin-1.6.2.3. See the build log above for details.

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