There's no doubt that Hugs could produce better error messages in this
situation and perhaps offer some advice to the user.  But I don't
think it would be wise to treat these top-level expressions
differently from those in scripts.  If the user types in [], should
Hugs print [] or ""?  Without invoking some sort of defaulting not
specified in the report, you can't know.  If the user types
(reverse "") should the system print []?  That's confusing too.

Problems with a missing "deriving Show" don't bother me: the error is
easily understood and corrected.  It would bother me if code that
works fine from the command line didn't typecheck in a program.

I'm not saying these are real concerns; I just think the issue here is
better error messages rather than any sort of semantic change in Hugs.

   John

Reply via email to