我对haskell一无所知,我正试图在linux上设置堆栈(静态)2.1.3-3来处理Atom1.45中的包,但它不起作用。
atom-haskell的安装创建了2条错误消息:-Failed激活ide-haskell包,结果已经连接!错误是从ide-haskell包抛出的。这一问题已经有报道。(github.com/atom-haskell/ide-haskell/issues/138) -Atom找不到ghcmod可执行文件
所以我看了看https://atom.io/packages/atom-haskell,并了解到要建立二进制文件,我必须使用
堆栈安装ghc-mod hoogle hasktag
但这是行不通的:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for cabal-install-3.0.0.0:
base-4.13.0.0 from stack configuration does not match >=4.8 && <4.13 (latest matching version is 4.12.0.0)
hackage-security must match >=0.5.2.2 && <0.6, but the stack configuration has no specified version (latest matching version is
0.5.3.0) needed since cabal-install is a build target.
In the dependencies for ghc-mod-5.8.0.0:
Cabal-3.0.1.0 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0)
base-4.13.0.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0)
cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version (latest matching version is
0.7.3.0)
djinn-ghc must match <0.1 && >=0.0.2.2, but the stack configuration has no specified version (latest matching version is
0.0.2.3)
extra-1.6.20 from stack configuration does not match <1.6 && >=1.4 (latest matching version is 1.5.3)
fclabels must match ==2.0.*, but the stack configuration has no specified version (latest matching version is 2.0.4)
ghc-8.8.2 from stack configuration does not match >=7.6 && <8.2
ghc-syb-utils must match <0.3 && >=0.2.3, but the stack configuration has no specified version (latest matching version is
0.2.3.3)
haskell-src-exts-1.22.0 from stack configuration does not match <1.20 && >=1.18 (latest matching version is 1.19.1)
hlint-2.2.11 from stack configuration does not match <2.1 && >=2.0.8 (latest matching version is 2.0.15)
monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4 (latest matching version is 0.7.2)
optparse-applicative-0.15.1.0 from stack configuration does not match >=0.13.0.0 && <0.14 (latest matching version is 0.13.2.0)
semigroups-0.19.1 from stack configuration does not match >=0.10.0 && <0.19 (latest matching version is 0.18.5)
temporary-1.3 from stack configuration does not match <1.3 && >=1.2.0.3 (latest matching version is 1.2.1.1) needed since ghc-mod is a build target.
In the dependencies for hasktags-0.71.2:
json must match >=0.5 && <0.11, but the stack configuration has no specified version (latest matching version is 0.10) needed since hasktags is a build target.
In the dependencies for pointfree-1.1.1.6:
base-4.13.0.0 from stack configuration does not match >=4.5 && <4.13 (latest matching version is 4.12.0.0)
haskell-src-exts-1.22.0 from stack configuration does not match ==1.20.* (latest matching version is 1.20.3) needed since pointfree is a build target.
In the dependencies for pointful-1.1.0.0:
haskell-src-exts-simple must match >=1.18 && <1.21 || ^>=1.21, but the stack configuration has no specified version (latest matching version is 1.21.1.0) needed since pointful is a build target.https://atom-haskell.github.io/core-packages/haskell-ghc-mod/#using-with-stack上的“警告”解决了ghcmod问题:在~/..stack/global-project/stack.yaml中将解析器版本设置为lts-9.21 (上面写着"lts-9“--这更正确吗?)有更多的说明在该网站,但我不明白他们。
现在出现了一个新的错误:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for pointfree-1.1.1.6:
haskell-src-exts-1.18.2 from stack configuration does not match ==1.20.* (latest matching version is 1.20.3)
needed since pointfree is a build target.
Some different approaches to resolving this:
* Set 'allow-newer: true' in /home/bradz/.stack/config.yaml to ignore all version constraints and build anyway.
* Recommended action: try adding the following to your extra-deps in /home/bradz/.stack/global-project/stack.yaml:
- haskell-src-exts-1.20.3@sha256:83ae523bbec907a42c043de1f5bbf4c1554e7c3b898af07bb1ce6e80eaa282ec,4589
Plan construction failed.因此,我按照建议将其添加到我的stack.yaml中,现在看起来如下所示:
packages: []
resolver: lts-9.21
extra-deps:
- haskell-src-exts-1.20.3@sha256:83ae523bbec907a42c043de1f5bbf4c1554e7c3b898af07bb1ce6e80eaa282ec,4589但这似乎是错误的,因为现在我又收到了ghcmod错误,甚至更多:
$ stack install ghc-mod hoogle hasktags pointfree pointful cabal-install
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for ghc-mod-5.8.0.0:
haskell-src-exts-1.20.3 from stack configuration does not match <1.20 && >=1.18 (latest matching version is 1.19.1)
needed since ghc-mod is a build target.
In the dependencies for haskell-src-exts-simple-1.19.0.0:
haskell-src-exts-1.20.3 from stack configuration does not match >=1.18 && <1.20 (latest matching version is 1.19.1)
needed due to pointful-1.0.9 -> haskell-src-exts-simple-1.19.0.0
In the dependencies for hlint-2.0.11:
haskell-src-exts-1.20.3 from stack configuration does not match >=1.18 && <1.20 (latest matching version is 1.19.1)
needed due to ghc-mod-5.8.0.0 -> hlint-2.0.11
In the dependencies for hoogle-5.0.14:
haskell-src-exts-1.20.3 from stack configuration does not match >=1.18 && <1.20 (latest matching version is 1.19.1)
needed since hoogle is a build target.
Some different approaches to resolving this:
* Set 'allow-newer: true' in /home/bradz/.stack/config.yaml to ignore all version constraints and build anyway.
* Recommended action: try adding the following to your extra-deps in /home/bradz/.stack/global-project/stack.yaml:
- haskell-src-exts-1.19.1@sha256:30176fc34fb3a4eba0a7c31e50a2b09c70aab422e784de9f6b437eabe7de1288,4235
Plan construction failed.编辑:在/home/bradz/. stack /config.yaml中设置‘also更新: true’,然后执行堆栈安装切入点,也不起作用:
WARNING: Ignoring pointfree's bounds on haskell-src-exts (==1.20.*); using haskell-src-exts-1.18.2.
Reason: allow-newer enabled.
(...) (~300 lines omitted)
haskell-src-exts> Registering haskell-src-exts-1.18.2...
pointfree > configure
pointfree > Configuring pointfree-1.1.1.6...
pointfree > build
pointfree > Building pointfree-1.1.1.6...
pointfree > Preprocessing library pointfree-1.1.1.6...
pointfree > [1 of 7] Compiling Plugin.Pl.Common ( Plugin/Pl/Common.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-1.24.2.0/build/Plugin/Pl/Common.o )
pointfree > [2 of 7] Compiling Plugin.Pl.Parser ( Plugin/Pl/Parser.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-1.24.2.0/build/Plugin/Pl/Parser.o )
pointfree >
pointfree > /tmp/stack2192/pointfree-1.1.1.6/Plugin/Pl/Parser.hs:25:3: error:
pointfree > • Couldn't match expected type ‘HSE.SpecialCon a’
pointfree > with actual type ‘HSE.Exp t0’
pointfree > • In the pattern: HSE.ExprHole {}
pointfree > In a case alternative: HSE.ExprHole {} -> todo sc
pointfree > In the expression:
pointfree > case sc of {
pointfree > HSE.UnitCon _ -> (Pref, "()")
pointfree > HSE.ListCon _ -> (Pref, "[]")
pointfree > HSE.FunCon _ -> (Inf, "->")
pointfree > HSE.TupleCon _ HSE.Boxed n -> (Inf, replicate (n - 1) ',')
pointfree > HSE.TupleCon {} -> todo sc
pointfree > HSE.Cons _ -> (Inf, ":")
pointfree > HSE.UnboxedSingleCon {} -> todo sc
pointfree > HSE.ExprHole {} -> todo sc }
pointfree > • Relevant bindings include
pointfree > sc :: HSE.SpecialCon a (bound at Plugin/Pl/Parser.hs:17:28)
pointfree > qnameString :: HSE.QName a -> (Fixity, String)
pointfree > (bound at Plugin/Pl/Parser.hs:15:1)
Completed 9 action(s).
-- While building package pointfree-1.1.1.6 using:
/home/bradz/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-1.24.2.0 build --ghc-options ""
Process exited with code: ExitFailure 1请告诉我怎么解决这个问题。
发布于 2020-04-01 00:53:05
如果试图为atom包(或适用的依赖项)设置二进制文件,我可以使用不同的长期支持堆栈版本成功地安装依赖项。对于ghc-mod、hoogle、pointful和cabal install,我使用lts-9.21,而对hasktag、pointfree和brittany,我使用lts-11.22 =>。
stack --resolver lts-9.21 install ghc-mod hoogle pointful cabal-install和
stack --resolver lts-11.22 install hasktags pointfree brittany我希望这能帮到你。
https://stackoverflow.com/questions/60646553
复制相似问题