我正在尝试构建自己的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中将library-profiling和executable-profiling显式设置为False。
我在Mac OS上