Skip to content

would be nice if -fno-code and --make worked together

We had a Cabal feature request to omit linking to make it quicker in the use case that we just want to check that a package typechecks ok.

Omitting liking is good but we could save more time by omitting code generation too. The -fno-code would seem to be what we want in this case but it looks like it only works with batch mode and not --make mode. What happens at the moment when one uses -fno-code --make is that ghc cannot find the dependent modules, though it is not clear that it is actually looking for .hi files in any particular location. This is with 6.8.2, I've not checked with 6.10 but I assume it is the same.

So if it looks like it would not be too hard to do, then letting -fno-code work with --make would be occasionally useful. The expected result would be to write out the .hi files for all the modules but not the corresponding .o files. When combined with -O0 we might hope it to be a bit quicker than normal builds.

Of course it would not work in the case of template Haskell, but Cabal would just avoid using -fno-code if the package uses TH.

Trac metadata
Trac field Value
Version 6.8.2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information