ghc-6.2 bug in type inference
Simon Marlow
simonmar at microsoft.com
Fri Feb 6 11:02:56 EST 2004
> > Taking these in order:
> >
> > - -fglasgow-exts breaks Haskell 98 code: yes of course, because it
> > defines extra keywords for one thing.
>
> Yes, I accept that. Adding extra keywords is fine. Stealing an
> identifier (%) that already commonly means something else (as defined
> in the Haskell'98 Libraries, no less! - it was even in the Prelude
> once) is rather more confusing.
It doesn't really steal %, it only steals %-followed-by-varid. Implicit
parameters also steals ?-followed-by-varid. You can disable both of
these with -fno-implicit-params. -fglasgow-exts steals a bunch of other
syntactic forms, many of which are defined as being combinations of
things with no whitespace between, eg. <varid>#, [|, |].
This is all quite unsavoury, I agree. Which is why we're moving towards
letting you turn extensions on/off on an individual basis. Actually the
list of stolen syntax isn't that long (I just checked the lexer), so we
ought to be able to list these precisely in the manual too.
> But I suppose what I was really objecting to was that, because of the
> unfortunately behaviour of packages, I didn't even know -fglasgow-exts
> was in effect.
true, this is the real problem.
> > - throws up a misleading error message:
> > I'm not sure if you're
> > talking about this specific case or error messages in general.
>
> This specific case only. Of course error messages are hard to get
> right. Take this as a suggestion for improving one particular case
> that had me stumped for three days.
>
> > You can report this as a bug if you like :-)
>
> I thought I just did :-)
Simon: one complaint about a confusing type error message for you...
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list