On Sat, 2007-06-23 at 12:08 +0400, Serge D. Mechveliani wrote: > Dear GHC developers, > > Recently I submitted a bug report #1452 for ghc-6.6.1 > of undefined references at the stage of linking executable, > and also of ignoring un-existing module import. > > Now I discovered the following strange effect > (see the report source modules) which, probably, explains much. > > 1. (minor note) The file Match.hs-boot is not needed. > All the effects preserve after its removal. > > 2. The name `Match' must be in the list `other-modules:' > in the file > dm.cabal, which describes the package. > > But it is not in dm.cabal ! > Because I have forgotten to put it there.
Currently Cabal uses ghc --make to build packages. It starts from all the modules listed in the exposed-modules but ghc --make will find any other modules that are imported, even if they are not listed in the .cabal file in the exposed-modules or other-modules fields. That's the current system. The right system I think is for Cabal to do the dependency analysis itself (it needs to do that for proper support of pre-processors anyway). That would allow Cabal to notice when modules are imported but not listed in either the exposed-modules or other-modules fields. It could issue a warning or an error. Duncan _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs