Re: illegal export of lone data constructor

Iavor Diatchki <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
hello,

Andrew Frank wrote:
> (minor point:
> my report says that the prelude module is always available as qualified
> import (p. 71)
> the hugs now (2002) seem to require an explicite import qualified (after a
> import Prelude hiding (stuff))

the latest report is availabel online at haskell.org, and also as a 
book. currently the text about the prelude is as follows:

The Prelude module is imported automatically into all modules as if by 
the statement `import Prelude', if and only if it is not imported with 
an explicit import declaration. This provision for explicit import 
allows entities defined in the Prelude to be selectively imported, just 
like those from any other module.

thus if there is an explicit import of the Prelude, it behaves as any 
other import declaration would.  for example if a programmer writes:

import Prelude hiding (foldr)
'Prelude.foldr' is not in scope.

hope this helps
iavor

-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.