[GHC] #1799: Retain export-list order in ModIface,
use it in :browse
GHC
trac at galois.com
Wed Nov 7 07:12:32 EST 2007
#1799: Retain export-list order in ModIface, use it in :browse
---------------------+------------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: low | Milestone: 6.10 branch
Component: GHCi | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
---------------------+------------------------------------------------------
Comment (by simonpj):
Replying to [comment:3 simonmar]:
> Ideally I'd like to retain the order of the export list in the
`ModIface`, so that all `:browse M` output (as opposed to `:browse *M`)
would appear in export-list order. The compiled/interpreted distinction
would then disappear. At the moment it appears that `md_exports` in
`ModDetails` is always sorted by `OccName`.
There seem to be two places where the order might get scrambled:
* The call to `nubAvails` in `RnNames.rnExports`. This combines `T(C)`
with `T(D)` to give `T(C,D)`. I'm not sure whether you want to retain
exactly the former.
* The `groupFM` stuff in `MkIface.mkIfaceExports`, which further groups
exports by modules. This part could readily be omitted (although the
interface file format would then change).
The other potential cost is that `module M( a,b )` would be recorded as a
change from `module M( b, a )` and hence force recompilation. That
probably barely matters, though.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1799#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list