Macos 在Mac上安装带有Atom的Haskell时出现问题

Macos 在Mac上安装带有Atom的Haskell时出现问题,macos,haskell,installation,atom-editor,ghc-mod,Macos,Haskell,Installation,Atom Editor,Ghc Mod,我想在Mac上使用Atom在Haskell中编程。因此,我在Atom中安装了以下软件包: haskell-ghc-mod ide-haskell ide-haskell-cabal language-haskell 之后,我从这里安装了Haskell Platform 8.2.1: 这似乎不起作用,因为我无法编译,在每次启动Atom时都会出现以下错误消息: Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or

我想在Mac上使用Atom在Haskell中编程。因此,我在Atom中安装了以下软件包:

haskell-ghc-mod
ide-haskell
ide-haskell-cabal
language-haskell
之后,我从这里安装了Haskell Platform 8.2.1:

这似乎不起作用,因为我无法编译,在每次启动Atom时都会出现以下错误消息:

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
然后,我尝试手动安装必要的软件包,如上所述,但也失败了(甚至注销失败):

Daniels MacBook Pro:ghc mod沙盒daniel$cabal安装ghc mod Style haskell
正在解析依赖项。。。
阴谋集团:无法解析依赖项:
尝试:ghc-mod-5.8.0.0(用户目标)
下一个目标:基础(ghc-mod-5.8.0.0的依赖性)
拒绝:base-4.10.0.0/已安装-4.1。。。(冲突:ghc mod=>base=4.6.0.1)
拒绝:base-4.10.0.0,base-4.9.1.0,base-4.9.0.0,base-4.8.2.0,
base-4.8.1.0,base-4.8.0.0,base-4.7.0.2,base-4.7.0.1,base-4.7.0.0,
base-4.6.0.1,base-4.6.0.0,base-4.5.1.0,base-4.5.0.0,base-4.4.1.0,
base-4.4.0.0,base-4.3.1.0,base-4.3.0.0,base-4.2.0.2,base-4.2.0.1,
base-4.2.0.0,base-4.1.0.0,base-4.0.0.0,base-3.0.3.2,base-3.0.3.1
(来自不可升级包的约束要求安装实例)
在彻底搜索依赖关系树的其余部分后,这些是
我最难实现的目标是:base、ghc mod、syb
注意:当使用沙箱时,所有包都需要具有一致的
依赖关系。尝试重新安装/注销有问题的软件包或
重新创建沙箱。
Daniels MacBook Pro:ghc mod沙盒daniel$cabal卸载ghc mod Style haskell
阴谋集团:此版本的“阴谋集团安装”不支持“卸载”
活动它很可能在将来的某个时候实施;在
同时,建议您使用“ghc pkg注销ghc mod”或“阴谋集团”
沙盒hc组件--注销ghc mod'。
Daniels MacBook Pro:ghc mod沙盒daniel$ghc pkg取消注册ghc mod
ghc套件:找不到套件ghc mod
Daniels MacBook Pro:ghc mod sandbox daniel$cabal sandbox hc套件-注销ghc mod
ghc套件:找不到套件ghc mod
Daniels MacBook Pro:ghc mod沙盒daniel$cabal安装ghc mod时尚haskell
正在解析依赖项。。。
阴谋集团:无法解析依赖项:
尝试:ghc-mod-5.8.0.0(用户目标)
下一个目标:基础(ghc-mod-5.8.0.0的依赖性)
拒绝:base-4.10.0.0/已安装-4.1。。。(冲突:ghc mod=>base=4.6.0.1)
拒绝:base-4.10.0.0,base-4.9.1.0,base-4.9.0.0,base-4.8.2.0,
base-4.8.1.0,base-4.8.0.0,base-4.7.0.2,base-4.7.0.1,base-4.7.0.0,
base-4.6.0.1,base-4.6.0.0,base-4.5.1.0,base-4.5.0.0,base-4.4.1.0,
base-4.4.0.0,base-4.3.1.0,base-4.3.0.0,base-4.2.0.2,base-4.2.0.1,
base-4.2.0.0,base-4.1.0.0,base-4.0.0.0,base-3.0.3.2,base-3.0.3.1
(来自不可升级包的约束要求安装实例)
在彻底搜索依赖关系树的其余部分后,这些是
我最难实现的目标是:base、ghc mod、syb
注意:当使用沙箱时,所有包都需要具有一致的
依赖关系。尝试重新安装/注销有问题的软件包或
重新创建沙箱。

我已经找过答案了,但没有什么真正适合我的。有人能告诉我我遗漏了什么吗?

我可以就问题的一部分向你提出建议。来自阴谋集团的错误消息非常令人困惑,但它的意思是:

  • ghc mod
    不适用于
    base的4.10.0.0版
  • base
    库随GHC一起提供,不能更改
  • GHC 8.2.1底座为4.10.0.0的船舶
  • 因此:您无法使用下载的Haskell平台版本构建
    ghc mod
您可以通过下载旧的Haskell平台(8.0.2)来解决此问题。在我看来:升级后的Haskell平台版本为8.2.1还为时过早

另一种方法是使用Stack,它将为您管理GHC安装的安装。在这种情况下,运行
stack install ghc mod
应该可以正常工作。但由于您仍将使用Haskell平台上的GHC 8.2.1,这对您没有多大好处,因为GHC mod与您的GHC版本绑定

就我个人而言:我从未成功建立过ghc mod。我也从未使用过Atom或VS代码,但我听说有人分享过使用VS代码+Haskero的良好体验,因此如果您正在寻找类似IDE的体验,这可能是值得考虑的。我已经切换到使用Emacs +交互模式,这可能是需要考虑的事情。 以下是一些可能有助于开始使用工具的链接:


谢谢你的帮助。基本版本4.10.0.0似乎确实是原因(错误消息中确实说“基本不<4.10.0.0”,但我在尝试堆栈安装ghc mod hoogle hasktags pointfree pointful cabal安装后不知怎么读到了(他们在atom haskell包中推荐的)将安装过程中提到的路径/Users/daniel/.local/bin添加到atom中的路径似乎可以正常工作,atom中不再出现启动错误消息。但是:在atom中单击Haskell IDE/Builder/build project会导致:“IDE Haskell cabal error no cabal found”…:-(您可能需要为
ide haskell cabal
软件包提供支持。
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal uninstall ghc-mod stylish-haskell
cabal: This version of 'cabal-install' does not support the 'uninstall'
operation. It will likely be implemented at some point in the future; in the
meantime you're advised to use either 'ghc-pkg unregister ghc-mod' or 'cabal
sandbox hc-pkg -- unregister ghc-mod'.

Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ ghc-pkg unregister ghc-mod

ghc-pkg: cannot find package ghc-mod

Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal sandbox hc-pkg -- unregister ghc-mod

ghc-pkg: cannot find package ghc-mod

Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.