problem with hiding?
Sigbjorn Finne
sigbjorn_finne@hotmail.com
Sat, 3 Mar 2001 20:21:54 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0084_01C0A41F.9666E100
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Johan Nordlander nordland@cse.ogi.edu writes:
>
>> Christian Sievers wrote:
>> Hello,
>>
>> there may be a bug with hiding imports.
>>
>> I tried to load Functional Metapost
>> (http://www.informatik.uni-bonn.de/~ralf/FuncMP.tar.gz)
>> and expected all sorts of problems as it is described to be written
>> in Haskell 1.4, but not this one:
>>
>> Prelude> :l FMPMain
>> [...]
>> ERROR FMPMain.lhs - Entity "space" imported from module "FMPPP"
>> already defined in module "FMPPicture"
>>
>> However, the file FMPMain.lhs contains the line
>> > import FMPPicture hiding (text,empty,space)
>>
>> I cannot see what's goin here: simple tests with hiding worked well.
>> I'm using the Feb 2001 version.
>
>
> The reason this example doesn't work is because of the module
> FMPMpsyntax, which imports FMPPicture selectively, and then reexports
> FMPPicture in the module header. Hugs doesn't implement this correctly,
> it reexports all identifiers of every module mentioned in its export list.
I've been bitten by this infelicity numerous times too, and started a while
ago to modify the sources so as to fix it, but never got around to
completing
the job. The above report caused me to finally do something about it, so
attached is a patch which fixes this problem for Hugs98 (wrt Feb 2001
sources.) Hopefully the patch is in a decent enough shape for it to
be included & that it will prove useful to others.
BTW, the FuncMP source code highlighted that the version of GHC used
to develop FuncMP didn't implement module re-exportation properly - I
had to tweak one of the modules (FMPMpsyntax) quite a bit to have it
work with Hugs98 (and ghc-4.08)
--sigbjorn
------=_NextPart_000_0084_01C0A41F.9666E100
Content-Type: application/x-gzip;
name="module-patch.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="module-patch.gz"
H4sICMo/oToAA21vZHVsZS1wYXRjaADNWetv20YS/6wA+R/GLq6ibFrWw5IsG/7gJk7PgB9F5PRw
QIEDRa4iwhSp4y4jGYX7t9/MvriU6dhunF6FwJGWO7Mzs795cmdn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