[cvs-nhc98] patch applied (hat): Fix several serious bugs in the
import mechanism.
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:08:00 EDT 2006
Thu Oct 4 07:10:55 PDT 2001 malcolm
* Fix several serious bugs in the import mechanism.
A module A which imported another module B both qualified and
unqualified got very confused about what names were visible, and what
could be re-exported. The reason was that the qualified/unqualified
distinction was being applied per module, not per identifier.
A module containing imports such as
import B (y)
import B hiding (x)
was being rejected with the spurious error that using both explicit
imports and explicit hidings is not permitted.
An implicit
import qualified Prelude
was being (incorrectly) added to all modules.
Some bugs still remain for now: it is not possible to import or
export only some constructors of a type / fields of a type / methods
of a class. Either you get all of them or none of them.
M ./src/compiler98/IExtract.hs -99 +134
M ./src/compiler98/Import.hs -4 +4
M ./src/compiler98/Main.hs -2 +2
M ./src/compiler98/MainNew.hs -9 +8
M ./src/compiler98/Need.hs -17 +20
M ./src/compiler98/PreImport.hs -292 +258
M ./src/compiler98/Rename.hs -8 +8
M ./src/compiler98/RenameLib.hs -3 +3
More information about the Cvs-nhc98
mailing list