加快GHC的编译速度 [英] Speed up compilation in GHC
问题描述
除 -O0
之外是否还有其他选项可以加快编译时间?
Is there options, except -O0
, that can speed up compilation time?
没关系结果程序将不会优化。实际上,我只想经常快速地检查大型haskell软件包。
It's not matter if resulting programs will be not optimised. Actually I want to just type-check large haskell package often and fast.
标记 -fno-code
显着提高速度但由于该程序使用了TemplateHaskell,因此无法使用它。
Flag -fno-code
dramatically speeds up compilation but it's not possible to use it because TemplateHaskell is used by this program.
推荐答案
看起来像是一个 hdevtools ! Hdevtools被用来作为同名vim-plugin的后端,它直接从编辑器提供快速的语法和类型检查。重新加载模块时,速度与ghci一样快。我认为它可以在命令行中使用。
Looks like a task for hdevtools! Hdevtools is used to as a backend for vim-plugin of the same name and it provides speedy syntax and type checking, directly from the editor. It is about as fast as ghci when reloading modules. I assume that it can be used from the command line.
另一种方法是保持ghci实例运行并使用它来键入检查模块。
Another alternative would be to keep a ghci instance running and use that to type check your modules.
这篇关于加快GHC的编译速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!