logo       

Re: [GHC] #914: Improve detection of unnecessary SOURCE imports: msg#00118

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #914: Improve detection of unnecessary SOURCE imports

#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_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise