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
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
Johan Nordlander wrote:
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...
Thanks a lot. For now I won't try this (I only wanted to let you know), but rather try to work around it. But if you could improve the error message... Still I find it strange because from the documentation I got the impression that it worked with Hugs 1.4. But then, that occurence of fst in FMPMain.lhs seems wrong, too. Bye Christian Sievers
participants (2)
-
Christian Sievers -
Johan Nordlander