【发布时间】:2016-07-25 06:12:14
【问题描述】:
我尝试导入 Data.Numbers.Primes
import Data.Numbers.Primes
runhaskell 给了我:
5.hs:1:8:
Could not find module `Data.Numbers.Primes'
Use -v to see a list of the files searched for.
ghci 给了我:
<no location info>:
Could not find module `Data.Numbers.Primes'
It is not a module in the current program, or in any known package.
我尝试通过 cabal 安装 Data.Numbers.Primes,但我得到了:
cabal update
...
cabal install Data
cabal: There is no package named 'Data'.
You may need to run 'cabal update' to get the latest list of available
packages.
cabal install Data.Numbers.Primes
cabal: The file does not exist 'Data.Numbers.Primes'.
帮助?
【问题讨论】:
-
Hayoo 是一个很好的搜索引擎。
-
另外,开始使用堆栈来避免依赖地狱问题。
-
@MichaelLitchard 新手,你能详细说明一下吗?
-
啊,是的,你走得越远,你就越有可能遇到我们称之为“依赖地狱”的传递性问题。查看堆栈以获取解决方案。 github.com/commercialhaskell/stack/tree/master/doc