gpt4 book ai didi

haskell - 如何在 ghc 中链接模块?

转载 作者:行者123 更新时间:2023-12-04 19:20:29 26 4
gpt4 key购买 nike

我有一个使用 Data.Set 和 Data.IntMap 的 haskell 程序,我需要给 GHC 哪些标志才能让它链接这些库?简单的问题,我知道,但是手册页没有帮助我,我不知道在哪里看。

最佳答案

添加 --make 将告诉 GHC 查找所有依赖项并自动为您完成所有链接:

GHC will figure out all the modules in the program by following the imports from these initial modules. It will then attempt to compile each module which is out of date, and finally, if there is a Main module, the program will also be linked into an executable.

关于haskell - 如何在 ghc 中链接模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3956666/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com