[Haskell-cafe] Cabal: other-modules necessary?
Volker Wysk
post at volker-wysk.de
Fri Sep 16 09:28:36 UTC 2022
Am Freitag, dem 16.09.2022 um 10:12 +0100 schrieb Oliver Charles:
> Hi Volker,
>
> If you don't mention all modules in your Cabal file you may well get some
> very confusing linker errors later on when you build an executable, or try
> to use your library in another component. See
> https://stackoverflow.com/questions/28857275/cabal-test-fails-to-link-its-own-objects
> for one such example of the very cryptic error you'll likely eventually
> run into!
It works now, without other-modules. I don't have a library in my package,
just executables.
But I guess you're right. I'll rather add all the modules to the cabal file.
It's just a little bothersome.
Volker
>
> Ollie
>
> On Fri, 16 Sep 2022, at 9:47 AM, Volker Wysk wrote:
> > Hi
> >
> > 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?
> >
> > Apart from that, I'm happy with cabal. :-)
> >
> > Cheers,
> > Volker
> > _______________________________________________
> > 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.
>
> _______________________________________________
> 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.
More information about the Haskell-Cafe
mailing list