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.
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.
I've found splitting up large files can speed up compilation.
来源:https://stackoverflow.com/questions/15662984/speed-up-compilation-in-ghc