簡體   English   中英

在 Osx 10.15.3 上安裝 ghc-mod 失敗(已嘗試使用 lts-8.24)

[英]Install the ghc-mod fails on Osx 10.15.3(already try with lts-8.24)

我是haskell 的新手,想在vs 代碼上部署haskell。 當我嘗試使用“stack install ghc-mod --resolver lts-8.24”安裝 ghc-mod 時。 動作失敗。 如果有人可以幫助我,將不勝感激! 錯誤日志如下:

happy           >      warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
happy           >
happy           > /Users/a2/.stack/programs/x86_64-osx/ghc-8.0.2/lib/ghc-8.0.2/include/rts/storage/ClosureMacros.h:503:56: error:
happy           >      note: expanded from macro 'ZERO_SLOP_FOR_SANITY_CHECK'
happy           > #define ZERO_SLOP_FOR_SANITY_CHECK (defined(DEBUG) && !defined(THREADED_RTS))
happy           >                                                        ^
happy           > 9 warnings generated.
happy           > clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
happy           > copy/register
happy           > Installing executable(s) in
happy           > /Users/a2/.stack/snapshots/x86_64-osx/e87c8df95ec9518f8408232a2e3513d766cdb2d97a442d1257a73460a8d14994/8.0.2/bin

--  While building package profunctors-5.2 using:
      /Users/a2/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1

如果你只是想讓 haskell 在 vscode 上工作,那么我發現 ghcide 工作得很好。

https://github.com/digital-asset/ghcide

將其檢出到本地目錄,並修改隨附的 stack.yaml,使其與您要使用的項目具有相同的解析器。

例如改變這一行:

解析器:nightly-2019-09-21

到:

解析器:lts-14.12

然后使用:(記下它放置可執行文件的位置)

堆棧安裝

最后,打開 vscode 並添加 ghcide 擴展並將其指向配置中的 ghcide 可執行文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM