<p>Thanks for bringing this up. I&#39;ve been having the same problem and was thinking there was something wrong with my system. I have 3 main files and one util that they all import. Every build recompiles every file, even if there were no changes. </p>

<div class="gmail_quote">On Feb 15, 2012 8:39 PM, &quot;Conrad Parker&quot; &lt;<a href="mailto:conrad@metadecks.org">conrad@metadecks.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
We have a project with around 200 Haskell source files, and around 20<br>
executables which import these (as well as importing third-party<br>
libraries). We first build all the non-main files using a makefile<br>
generated with ghc -M. We then build the executables using a separate<br>
invocation of &quot;ghc --make --main-is foo.hs&quot;, for each foo.hs. This<br>
worked fine with ghc-7.2.1; each final &quot;ghc --make&quot; would simply link<br>
the pre-built object files -- but with ghc-7.4.1 all these files are<br>
recompiled for each target executable. As a result our full build<br>
takes around 10-20x longer with ghc-7.4.1 than ghc-7.2.1.<br>
<br>
Looking at compiler/iface/FlagChecker.hs, it seems that the --main-is<br>
flag is used as an input to the recompilation checker. It would make<br>
sense that --main-is should force recompilation of the particular file<br>
that exports &#39;main&#39;, but it also forces recompilation of its<br>
dependencies. Is this a bug or is there a good reason to recompile<br>
everything?<br>
<br>
Conrad.<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div>