简体   繁体   English

加快GHC的编译速度

[英]Speed up compilation in GHC

Is there options, except -O0 , that can speed up compilation time? 是否有选项,除了-O0 ,可以加快编译时间?

It's not matter if resulting programs will be not optimised. 如果生成的程序不会被优化,那也没关系。 Actually I want to just type-check large haskell package often and fast. 实际上我想经常快速地检查大型haskell包。

Flag -fno-code dramatically speeds up compilation but it's not possible to use it because TemplateHaskell is used by this program. 标记-fno-code显着加快了编译速度,但由于此程序使用了TemplateHaskell,因此无法使用它。

Looks like a task for hdevtools ! 看起来像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. Hdevtools用作同名vim-plugin的后端,它直接从编辑器提供快速的语法和类型检查。 It is about as fast as ghci when reloading modules. 重装模块时,它与ghci一样快。 I assume that it can be used from the command line. 我假设它可以从命令行使用。

Another alternative would be to keep a ghci instance running and use that to type check your modules. 另一种方法是保持ghci实例运行并使用它来键入检查模块。

我发现拆分大文件可以加快编译速度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM