The Report says (Section 5.3.1 of Haskell 1.4 Report):
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 values defined in the Prelude to be hidden from the
unqualified name space.
Can I clarify that the phrase "if it is not imported with an explicit
import declaration" applies only to unqualified imports of the Prelude
and not to qualified imports?
If so, then the following program:
> import qualified Prelude
>
> main :: IO ()
> main = print Prelude.True
is valid, despite referring to unqualified `print' and importing the
Prelude explicitly but qualified, whereas:
> import Prelude ()
> import qualified Prelude
>
> main :: IO ()
> main = print Prelude.True
is not as the Prelude is now imported explicitly and unqualified
without `print' or `IO'.
Graeme.
PS. If this is the case, then both GHC 2.07 and HBC 0.9999.4 are
broken (but nhc isn't ;-). If not, then nhc is broken, and GHC and
HBC are not. :-)