[ ghc-Bugs-475691 ] import leakage

noreply@sourceforge.net noreply@sourceforge.net
Sun, 28 Oct 2001 01:56:48 -0800


Bugs item #475691, was opened at 2001-10-28 01:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=475691&group_id=8032

Category: Compiler
Group: 5.02
Status: Open
Resolution: None
Priority: 5
Submitted By: Carl Witty (cwitty)
Assigned to: Nobody/Anonymous (nobody)
Summary: import leakage

Initial Comment:
When I compile with ghc --make, sometimes imports from
one module "leak" into the imports list (in the .hi
file) of another, unrelated module that was compiled later.

For example:
Point.lhs is the following file:
\begin{code}
module Point (
         module PointClass, module Point1, module Point2, 
         module Point3, module Point4, module PointN,
module Point
       ) where

import PointClass
import Point1
import Point2
import Point3
import Point4
import PointN
\end{code}

In one particular ghc run, files were compiled like this:
Skipping  PointClass       (
/sc/downloads/GeomAlgLib/haskell/PointClass.lhs,
/sc/downloads/GeomAlgLib/haskell/PointClass.o )
Skipping  Point1           (
/sc/downloads/GeomAlgLib/haskell/Point1.lhs,
/sc/downloads/GeomAlgLib/haskell/Point1.o )
Skipping  Point2           (
/sc/downloads/GeomAlgLib/haskell/Point2.lhs,
/sc/downloads/GeomAlgLib/haskell/Point2.o )
Skipping  Point3           (
/sc/downloads/GeomAlgLib/haskell/Point3.lhs,
/sc/downloads/GeomAlgLib/haskell/Point3.o )
Skipping  PointN           (
/sc/downloads/GeomAlgLib/haskell/PointN.lhs,
/sc/downloads/GeomAlgLib/haskell/PointN.o )
Skipping  Point4           (
/sc/downloads/GeomAlgLib/haskell/Point4.lhs,
/sc/downloads/GeomAlgLib/haskell/Point4.o )
Skipping  GLExtra          ( GLExtra.hs, GLExtra.o )
Skipping  GtkExtra         ( GtkExtra.hs, GtkExtra.o )
Compiling Point            (
/sc/downloads/GeomAlgLib/haskell/Point.lhs,
/sc/downloads/GeomAlgLib/haskell/Point.o )

None of the Point* modules depend on GdkPixmap (as
verified by looking in their .hi files), but GtkExtra
does.  After this run, Point.hi contains the line
import GdkPixmap !;
(This means that subsequent compiles of different
programs using Point will fail, since they don't have
the right compiler flags to find GdkPixmap.hi.)
System information:
Linux nebula 2.4.9-686 #1 Sun Aug 19 10:46:52 EST 2001
i686 unknown
gcc version 2.95.4 20011006 (Debian prerelease)

I am attaching a transcript of a compile run using -v.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=475691&group_id=8032