haskell - Numeric.LinearProgramming 因堆栈构建而失败
问题描述
我能够使用堆栈安装相关的库 hmatrix-glpk-0.19.0.0 但是当我运行堆栈构建时
我明白了
error:
Could not load module ‘Numeric.LinearProgramming’
It is a member of the hidden package ‘hmatrix-glpk-0.19.0.0’.
Perhaps you need to add ‘hmatrix-glpk’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
4 | import Numeric.LinearProgramming
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
任何的想法 ?
解决方案
使用 Stack 构建的程序不能使用任何他们想要的已安装包。他们使用的每个包都需要在他们的 cabal 文件(如您的错误所示)或 package.yaml 中列为依赖项。添加hmatrix-glpk
到您拥有的任何一个,然后重试。
推荐阅读
- algorithm - 通过分配符号来检查一系列整数是否为 0 的最有效算法是什么?
- python - Pycharm:将文件添加到路径
- c# - 如何在 C# 统一脚本中添加延迟
- spring - 春季批处理分布式事务配置 IBM Liberty
- javascript - 如何在 Angular 6 中加密和解密
- python - 从 Python 2.7 中的众多字典之一中获取价值?
- python - 以 write_only 模式打开现有电子表格
- bash - 调用 SVN 更新的 Cronjob 无法使用凭据
- javascript - 编译数据数组以传递给 Materialise 自动完成
- laravel - laravel 5.7 中用于管理员保护的电子邮件验证