Haskell:GHC包装环境
嗨,我的软件包烤面包机
,i cabal v2-install lib:toaster -package-env〜/myenv/
在〜/myenv/code>中dir,有
.ghc.environment.x86_64-linux-9.2.2
我还设置了环境变量,以指向myenv
dir。
不幸的是,Cabal Install
不会更新环境。
我做错了吗?
当我runghc hello.hs
时,它说烤面包机
被隐藏了。
找到答案:
cabal install-lib lib:toaster -overwrite-policy =始终-env〜/dev/dev/haskell/pkg_env/
Hi in my package toaster
, i cabal v2-install lib:toaster --package-env ~/myenv/
In the ~/myenv/
dir, there is .ghc.environment.x86_64-linux-9.2.2
I've also set the environment variable to point to the myenv
dir.
Unfortunately, cabal install
doesn't update the environment.
Am i doing the wrong way?
when I runghc Hello.hs
, it says that toaster
is hidden.
Found the answer:
cabal install --lib lib:toaster --overwrite-policy=always --env ~/dev/haskell/pkg_env/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,
Cabal install
仅安装可执行文件,存储仅在其缓存中构建的库。如果您希望将库放在某个地方,则必须将- lib
添加到cabal install
line。By default,
cabal install
only installs executables, storing libraries built along the way only in its cache. If you want the library to be put somewhere, you must add--lib
to yourcabal install
line.