[GHC] #914: Improve detection of unnecessary SOURCE imports
GHC
trac at galois.com
Thu Sep 28 05:23:24 EDT 2006
#914: Improve detection of unnecessary SOURCE imports
-------------------------------+--------------------------------------------
Reporter: simonmar | Owner: simonmar
Type: task | Status: new
Priority: normal | Milestone: _|_
Component: Compiler | Version: 6.5
Severity: normal | Resolution:
Keywords: | Os: Unknown
Difficulty: Moderate (1 day) | Architecture: Unknown
-------------------------------+--------------------------------------------
Old description:
> Currently unnecessary SOURCE imports are detected by the renamer, but
> that is a slightly unsatisfactory solution because it is unpredictable
> whether we will have compiled the real module before we get to the
> unnecessary SOURCE import or not - it depends on the topological sort
> performed by the downsweep (or make).
>
> An improvement would be to look at the results of the strongly connected
> component analysis performed on the graph with SOURCE imports included,
> and report any SOURCE import edges ''between components'' as unnecessary,
> because replacing one of these with a non-SOURCE import cannot introduce
> a cycle.
New description:
Currently unnecessary SOURCE imports are detected by the renamer, but that
is a slightly unsatisfactory solution because it is unpredictable whether
we will have compiled the real module before we get to the unnecessary
SOURCE import or not - it depends on the topological sort performed by the
downsweep (or make).
An improvement would be to look at the results of the strongly connected
component analysis performed on the graph with SOURCE imports included,
and report any SOURCE import edges ''between components'' as unnecessary,
because replacing one of these with a non-SOURCE import cannot introduce a
cycle.
Related to #906
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/914>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list