entities imported from multiple modules

Ross Paterson ross@soi.city.ac.uk
Wed, 4 Dec 2002 14:06:31 +0000


On Wed, Dec 04, 2002 at 02:50:02PM +0100, Stavros Tripakis wrote:
> I would like to report what I believe is a difference of Hugs
> with the Haskell'98 report, in particular the section :
> 
> http://haskell.cs.yale.edu/onlinereport/modules.html#sect5
> 
> In this section, it is mentionned that
> 
> "There is no reference to y, so it is not erroneous that distinct
> entities called y are exported by both B and C. An error is only
> reported if y is actually mentioned. "
>
> However, Hugs complains:
> 
> ERROR A.hs - Entity "y" imported from module "B" already defined in module "C"

I believe that you're using the December 2001 release of Hugs.
The implementation of imports and exports in the November 2002 release
is much improved (by Sigbjorn Finne), and maybe even correct.  In your
example, it reports

ERROR "A.hs":4 - Ambiguous variable occurrence "x"
*** Could refer to: C.x B.x

and if x is unused, no error at all.