Speed up compilation in GHC

老子叫甜甜 提交于 2019-12-04 19:09:33

问题


Is there options, except -O0, that can speed up compilation time?

It's not matter if resulting programs will be not optimised. Actually I want to just type-check large haskell package often and fast.

Flag -fno-code dramatically speeds up compilation but it's not possible to use it because TemplateHaskell is used by this program.


回答1:


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.

Another alternative would be to keep a ghci instance running and use that to type check your modules.




回答2:


I've found splitting up large files can speed up compilation.



来源:https://stackoverflow.com/questions/15662984/speed-up-compilation-in-ghc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!