Haskell 将构建工具(Alex)与堆栈和GHCJ一起使用

Haskell 将构建工具(Alex)与堆栈和GHCJ一起使用,haskell,haskell-stack,ghcjs,Haskell,Haskell Stack,Ghcjs,我依赖于一个需要alex构建的包,我也需要ghcjs 当我尝试运行堆栈ghci时: language-java-0.2.8: configure (lib) Error: -- While building package language-java-0.2.8 using: <long command> Process exited with code: ExitFailure 1 Logs have been written to: /Users/

我依赖于一个需要alex构建的包,我也需要ghcjs

当我尝试运行
堆栈ghci
时:

language-java-0.2.8: configure (lib)

Error:
--  While building package language-java-0.2.8 using:
      <long command>
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/LeanderK/Documents/Haskell/exemplator-java_parser/.stack-work/logs/language-java-0.2.8.log

Configuring language-java-0.2.8...
Cabal-simple_mPHDZzAJ_1.24.2.0_ghcjs-0.2.1.9007019_ghc-8.0.1: The program
'alex' version >=3.1.3 is required but it could not be found.

Warning: Build failed, but optimistically launching GHCi anyway
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Configuring GHCi with the following packages: exemplator-client
Using main module: 1. Package `exemplator-client' component exe:exemplator-client-exe with main-is file:         ..../app/Main.hs
Progress: 1/2<command line>: cannot satisfy -package language-java-0.2.8
(use -v for more information)

仅供参考:是依赖项的cabal文件,不幸的是仅在github上找到。是我的堆栈和文件。还有一个讨论没有进行到任何地方。

阴谋集团是否在
~
中安装alex有效?阴谋集团是否自动安装到
~/.cabal/bin
cabal安装alex
确实有效,但不会改变stack的情况。有没有办法让stack知道alex安装了cabal?如果存在,cabal默认会安装到沙箱中,这就是我添加该选项的原因。不过,我不知道堆栈,抱歉。好的,我通过cabal在没有任何沙箱的情况下全局安装了alex,不幸的是它无法工作。我认为您需要将
构建工具:alex
添加到cabal文件中的库中。
Couldn't find executable alex in directory .../.stack/snapshots/x86_64-osx/lts-7.19/ghcjs-0.2.1.9007019_ghc-8.0.1/bin/