Haskell 阴谋集团新安装hakyll无法建立依赖关系

Haskell 阴谋集团新安装hakyll无法建立依赖关系,haskell,cabal,hakyll,Haskell,Cabal,Hakyll,安装ghcup后,我尝试使用命令cabalnewinstallhakyll安装hakyll。 这会导致依赖项中的生成错误,文本转换库: Failed to build text-conversions-0.3.0. Build log ( /home/me/.cabal/logs/ghc-8.8.4/text-conversions-0.3.0-e3c3dbd414a885ff0e8ec81ad4c2c319c5dff5772ce6392ac561833941ecfd06.log ): Conf

安装
ghcup
后,我尝试使用命令
cabalnewinstallhakyll
安装
hakyll
。 这会导致依赖项中的生成错误,
文本转换库:

Failed to build text-conversions-0.3.0.
Build log (
/home/me/.cabal/logs/ghc-8.8.4/text-conversions-0.3.0-e3c3dbd414a885ff0e8ec81ad4c2c319c5dff5772ce6392ac561833941ecfd06.log
):
Configuring library for text-conversions-0.3.0..
Preprocessing library for text-conversions-0.3.0..
Building library for text-conversions-0.3.0..
[1 of 1] Compiling Data.Text.Conversions ( src/Data/Text/Conversions.hs, dist/build/Data/Text/Conversions.o )

src/Data/Text/Conversions.hs:152:5: error:
    • Couldn't match expected type ‘Either String B.ByteString’
                  with actual type ‘(B.ByteString, [Char])’
    • In the pattern: (bs, "")
      In a case alternative: (bs, "") -> Just $ Base16 bs
      In the expression:
        case Base16.decode (T.encodeUtf8 txt) of
          (bs, "") -> Just $ Base16 bs
          (_, _) -> Nothing
    |
152 |     (bs, "") -> Just $ Base16 bs
    |     ^^^^^^^^

src/Data/Text/Conversions.hs:153:5: error:
    • Couldn't match expected type ‘Either String B.ByteString’
                  with actual type ‘(a1, b1)’
    • In the pattern: (_, _)
      In a case alternative: (_, _) -> Nothing
      In the expression:
        case Base16.decode (T.encodeUtf8 txt) of
          (bs, "") -> Just $ Base16 bs
          (_, _) -> Nothing
    |
153 |     (_,  _)  -> Nothing
    |     ^^^^^^^

src/Data/Text/Conversions.hs:164:5: error:
    • Couldn't match expected type ‘Either String BL.ByteString’
                  with actual type ‘(BL.ByteString, [Char])’
    • In the pattern: (bs, "")
      In a case alternative: (bs, "") -> Just $ Base16 bs
      In the expression:
        case Base16L.decode (TL.encodeUtf8 $ TL.fromStrict txt) of
          (bs, "") -> Just $ Base16 bs
          (_, _) -> Nothing
    |
164 |     (bs, "") -> Just $ Base16 bs
    |     ^^^^^^^^

src/Data/Text/Conversions.hs:165:5: error:
    • Couldn't match expected type ‘Either String BL.ByteString’
                  with actual type ‘(a0, b0)’
    • In the pattern: (_, _)
      In a case alternative: (_, _) -> Nothing
      In the expression:
        case Base16L.decode (TL.encodeUtf8 $ TL.fromStrict txt) of
          (bs, "") -> Just $ Base16 bs
          (_, _) -> Nothing
    |
165 |     (_,  _)  -> Nothing
    |     ^^^^^^^
cabal: Failed to build text-conversions-0.3.0 (which is required by
exe:hakyll-init from hakyll-4.13.4.0). See the build log above for details.

知道哪里出了问题以及如何修复吗?

文本转换软件包与本周发布的最新版本的
base16 bytestring
不兼容。所以构建失败了

短期解决方案是添加一个约束,在
cabal install
命令中使用标志
--constraint=“base16 bytestring<1”
,或者在文件
~/.cabal/config
中添加行
约束:base16 bytestring<1
。()

从长远来看,必须修复
文本转换
包,以便在依赖项
base16 bytestring<1
上添加版本上限。您可以在以下问题中询问事物的状态:


理想情况下(不一定),应发布与
base16-bytestring-1.0.0.0
兼容的
文本转换的新版本,但是仍然有必要修正现有版本的界限,以避免出现任何损坏的构建计划。

文本转换
包与本周发布的最新版本的
base16 bytestring
不兼容。所以构建失败了

短期解决方案是添加一个约束,在
cabal install
命令中使用标志
--constraint=“base16 bytestring<1”
,或者在文件
~/.cabal/config
中添加行
约束:base16 bytestring<1
。()

从长远来看,必须修复
文本转换
包,以便在依赖项
base16 bytestring<1
上添加版本上限。您可以在以下问题中询问事物的状态:


理想情况下(不一定),应该发布与
base16-bytestring-1.0.0.0
兼容的
text conversions
的新版本,但仍然需要修复现有版本的边界,以避免出现不完整的构建计划。

非常感谢李耀!现在就可以建好了。非常感谢李瑶!它现在就建立起来了。