[prev in list] [next in list] [prev in thread] [next in thread]
List: hugs-bugs
Subject: Re: curiosity, bug, or just dead code?
From: Ross Paterson <ross () soi ! city ! ac ! uk>
Date: 2007-09-11 1:30:19
Message-ID: 20070911013019.GA6033 () soi ! city ! ac ! uk
[Download RAW message or body]
On Tue, Sep 11, 2007 at 12:02:26AM +0100, Claus Reinke wrote:
> consider this module, which is accepted by ghci-6.6.1:
>
> module T where
> import qualified Prelude as T(length)
> import Prelude(length)
> length = 0
All the GHC behaviour described above follows the Haskell 98 Report.
This treatment of omitted export lists is a documented bug in Hugs
(section 5.1.4 of the User's Guide).
On Mon, Sep 10, 2007 at 06:15:20PM -0700, Tim Chevalier wrote:
> This seems like a GHC bug to me. The Haskell 98 report says:
> "It is legal for more than one module in scope to use the same
> qualifier, provided that all names can still be resolved
> unambiguously." (section 5.3.3)
I think "all names" there was intended to mean all references in the
program (cf 5.5.2). The module exports the locally defined length,
and there is no reference to T.length.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic