Johannes Waldmann <waldm...@imn.htwk-leipzig.de> writes: > Duncan Coutts <duncan.coutts <at> googlemail.com> writes: > >> Your .cabal file probably does not list the "other-modules" as it >> should, so Cabal does not know that the other modules exist. > > Ah. > > Strange though that it seems to be able to do lots > of reasonable things (build the executable, build all the API docs) > without this "other-modules" section.
The executable bit cheats: since it just calls "ghc --make Main.hs", GHC will bring in all the other modules. However, I don't think in general that those other modules will be included into the tarball in question since Cabal doesn't know to include them. > I figure it's a cabal design choice, but I don't see the reason for > it. Dependency resolution (for modules) isn't done by Cabal; you have to explicitly state it. > It seems it just forces me to construct manually some information that > the machine already knows. The machine doesn't know; GHC might know but the machine doesn't. And whilst it might be possible to have "cabal init" generate Other-Modules for you, you'd still have to keep it in sync somehow. > OK, we have the same thing for type or interface specifications > (redundancy is good to detect programmer errors) > but I don't see from what errors we need protection here. What errors? You just have to somehow specify which files are being used by your package. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe