0

我正在尝试构建自己的 cabal 包,其中一个模块使用 Control.Monad.State,但出现以下错误:

executable/Example.hs:5:8:
    Could not find module `Control.Monad.State'
    It is a member of the hidden package `mtl-2.1.2'.
    Perhaps you need to add `mtl' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

我已将 mtl 添加到 build-depends 中但没有成功。我读到其他人在构建分析时遇到问题,而 mtl 不是为此而构建的,但我不应该为分析而构建。我在 ~/.cabal/config 中将库分析和可执行分析都明确设置为 False。

我在 Mac 操作系统上

4

0 回答 0