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
Hugs session for: /usr/local/lib/hugs/lib/Prelude.hs script.lhs M> :t length length :: Integer In previous versions of Hugs, and in the Haskell 98 report (Section 5.6.2), changing Prelude names requires a `hiding` declaration such as
import Prelude hiding (length)
Thanks, --Ham -- ------------------------------------------------------------------ Hamilton Richards Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138 Austin, Texas 78712-1188 ham@cs.utexas.edu hrichrds@swbell.net ------------------------------------------------------------------
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.
participants (2)
-
Hamilton Richards -
Ross Paterson