problem with hiding?

Johan Nordlander nordland@cse.ogi.edu
Fri, 02 Mar 2001 10:53:12 -0800


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 going here: simple tests with hiding worked well.
> I'm using the Feb 2001 version.
> 
> All the best
> Christian Sievers


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'm afraid this is a known bug that's been there since Hugs started to support
modules.  It's on my list of things to do, but not very highly prioritized.  But
I can always be persuaded...

All rthe best,
Johan