
Cabal doesn't know. GHC does, and is producing the
missing-home-modules warning. And even there, you're getting lucky; it
could miss one. Only the link step knows for certain what is missing,
because you would need whole-program compilation to reliably catch it
during the compile step.
On Fri, Sep 16, 2022 at 5:24 AM Tom Ellis
On Fri, Sep 16, 2022 at 10:47:47AM +0200, Volker Wysk wrote:
The cabal user guide says (in section 6.2.12): "Every module in the package must be listed in one of other-modules, library:exposed-modules or executable:main-is fields."
However, I only get a warning message, when I comment out the other-modules field in my .cabal file. The program compiles. This is the message:
<no location info>: warning: [-Wmissing-home-modules] These modules are needed for compilation but not listed in your .cabal file's other-modules: Hsskripte Sicherung SicherungAktionen Text Wahl Zeit
Is it really necessary to specify all the imported modules? If so, why does the program compile? Can that warning message be turned off?
In response to all the sibling replies at once, is there a good reason for this behaviour? Succeeding but then failing later with obscure errors (once the original warning message is nowhere to be seen) seems like the worst of all worlds. Suppose cabal errored here and failed to proceed. What would be the downside of that (besides backward incompatibility)?
Tom _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com