module bug?

Ross Paterson ross@soi.city.ac.uk
Sun, 2 Feb 2003 18:52:53 +0000


On Sun, Feb 02, 2003 at 11:33:52AM -0600, Hamilton Richards wrote:
> Version: November 2002
> 
> Platform: Mac OS X 10.2.3
> 
> Problem: Redefining Prelude names no longer requires explicit hiding.
> 
> Example:
> 
> script.lhs:
> --------------------
> > module M where
> 
> > length = 5
> --------------------

This is legal (5.5.2 of the Revised Report), as long as there is no
unqualified reference to length in the module, e.g.

	module M where
	length = 5
	f = M.length

is OK, but

	module M where
	length = 5
	f = length

is ambiguous.