stack install intero Quic-6ren">
gpt4 book ai didi

haskell - "Could not find module ‘Distribution.PackageDescription.Parse’ 使用 haskell 堆栈安装 Haskelly 扩展依赖项时出现错误

转载 作者:行者123 更新时间:2023-12-02 01:23:07 26 4
gpt4 key购买 nike

我正在尝试按照步骤 here 安装适用于 vs studio 代码的 Haskelly 扩展.

    rajkumar@linux-2278:~> stack install intero QuickCheck stack-run
stack-run-0.1.1.4: configure
stack-run-0.1.1.4: build

-- While building package stack-run-0.1.1.4 using:
/home/rajkumar/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /home/rajkumar/.stack/global-project/.stack-work/logs/stack-run-0.1.1.4.log

Configuring stack-run-0.1.1.4...
Preprocessing executable 'stack-run' for stack-run-0.1.1.4..
Building executable 'stack-run' for stack-run-0.1.1.4..

/tmp/stack30563/stack-run-0.1.1.4/unix/System/Console/Questioner.hs:4:14: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
|
4 | {-# LANGUAGE OverlappingInstances #-}
| ^^^^^^^^^^^^^^^^^^^^
[1 of 5] Compiling System.Console.Questioner.Autocomplete ( unix/System/Console/Questioner/Autocomplete.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/Autocomplete.o )
[2 of 5] Compiling System.Console.Questioner.Util ( unix/System/Console/Questioner/Util.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/Util.o )
[3 of 5] Compiling System.Console.Questioner.ProgressIndicators ( unix/System/Console/Questioner/ProgressIndicators.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/ProgressIndicators.o )
[4 of 5] Compiling System.Console.Questioner ( unix/System/Console/Questioner.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner.o )
[5 of 5] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/stack-run/stack-run-tmp/Main.o )

/tmp/stack30563/stack-run-0.1.1.4/src/Main.hs:18:1: error:
Could not find module ‘Distribution.PackageDescription.Parse’
Perhaps you meant
Distribution.PackageDescription.Parsec (needs flag -package-key Cabal-2.4.0.1)
Distribution.PackageDescription.Parsec (from Cabal-2.4.1.0)
Distribution.PackageDescription.Check (needs flag -package-key Cabal-2.4.0.1)
Use -v to see a list of the files searched for.
|
18 | import Distribution.PackageDescription.Parse

以下是/home/rajkumar/.stack/global-project/stack.yaml的内容 -

    packages: []
resolver: lts-13.21
allow-newer: true
extra-deps:
- conduit-1.2.13.1
- conduit-extra-1.1.17
- resourcet-1.1.11
- streaming-commons-0.1.19

cabal 版本 -

    $ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library

堆栈版本-

    $ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

以下是 OpenSuse 操作系统详细信息 -

    rajkumar@linux-2278:~> lsb_release -a
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: openSUSE
Description: openSUSE Leap 15.0
Release: 15.0
Codename: n/a

Fedora 30 操作系统中也会发生这种情况 -

    $ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 30 (Thirty)
Release: 30
Codename: Thirty

我不知道如何解决这个问题。任何想法都会有帮助。

最佳答案

您正在运行 Cabal 版本 2.4,包 Distribution.PackageDescription.Parse 已在 Cabal 2.2 中删除。 See Cabal issue tracker .

考虑使用Distribution.PackageDescription.Parsec代替。 They are using that in obelisk project .

关于haskell - "Could not find module ‘Distribution.PackageDescription.Parse’ 使用 haskell 堆栈安装 Haskelly 扩展依赖项时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56160068/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com