我正在开发许多小型haskell程序,我缩进这些程序作为脚本文件使用。我的理想用例是stack runhaskell one-of-the-scripts.hs来运行它们。
一些文件在黑客中使用包的依赖关系,如regex-posix。因此,我收到一条错误消息:
Could not find module `Text.Regex.Posix'
Use -v to see a list of the files searched for.
|
2 | import Text.Regex.Posix
| ^^^^^^^^^^^^^^^^^^^^^^^我考虑了两种选择:
stack runhaskell代替!在本地安装软件包的最简单方法是什么,然后可以用于stack runhaskell?
发布于 2018-01-23 11:09:45
您可能希望使用脚本解释器。抱歉,我的回答很简洁,但我正在打电话。这是它的文档:https://docs.haskellstack.org/en/stable/GUIDE/#script-interpreter
您也可以只做“堆栈构建regex”,然后这个包就可以用于runhaskell了。但是,这更容易出错,因为没有使用包隐藏,所以更难判断脚本实际依赖的是什么
https://stackoverflow.com/questions/48399750
复制相似问题