Is it possible to compile "file only" in a Kabbalah project?

In JVM-based programs, you can compile the file into a .class file and run the binary file again, without necessarily compiling all the files.

Can this be done in haskell? Is it necessary to compile and link all the files in the project? If so, why?

What if there is no binary file, you only install the library?

+3
source share
1 answer

For GHC, you can change and recompile one module without having to recompile the modules, depending on this, if the open interface does not change. GHC mode --make(by default from ghc-7. *) Checks whether recompilation is necessary and recompiles only those modules where it cannot determine that it is not needed.

If you have a cabal package and you cabal buildafter changing one module, you can see from the compiler output that it will not recompile all the modules in the package as a whole, only the changed module and [maybe] those, depending on this.

If you create an executable file, then of course you need to re-link it, but many old object files can be reused.

, , , , .

+4

All Articles