I (Matt Harden) wrote:
>
> Simon Peyton-Jones wrote:
> >
> > Gentle Haskellers,
> >
> > Here's a Haskell98-typo question.
> >
> > Consider this program:
> >
> > module M where
> >
> > reverse xs = Prelude.reverse (tail xs)
> >
> > foo ys = M.reverse ys
> >
> > This is legal Haskell98.
>
> OK, I believe you that it's legal Haskell98, but Hugs98-sep99 doesn't
> accept it. Maybe the report should read that if you're going to define
> reverse in your module, you must "import Prelude hiding (reverse)", and
> leave it at that. It eliminates the ambiguity by making it explicit
> that Prelude.reverse cannot be referred to unqualified. And you don't
> have to change Hugs.
OK, now I have reread the report, and it says:
> The rules about the Prelude have been cast so that it is possible
> to use Prelude names for nonstandard purposes; however, every
> module that does so must have an import declaration that
> makes this nonstandard usage explicit.
So the report already reads as I suggested. It seems to me that the
program above is not legal Haskell98, and there is no issue with
ambiguity of type declarations. Have I missed something?
Thanks,
Matt