Proposal: Improve Read Integer

Ian Lynagh igloo at
Tue Nov 16 17:23:22 EST 2010

On Tue, Nov 16, 2010 at 11:04:05PM +0200, Yitzchak Gale wrote:
> Ian Lynagh wrote:
> > Proposal: Improve Read Integer
> >
> > Currently, according to H98, H2010, GHC and hugs,
> >    reads "1.2" :: [(Integer, String)]
> > is
> >    []
> > whereas I would expect it to be
> >    [(1,".2")]
> >
> This is a good change. But for GHC the patch is not complete.
> It needs to provide the old behavior in H98 and H2010 mode.

To do this we'd have to have a separate Integer type in
haskell98/haskell2010, and therefore separate definitions of all
classes and functions whose types contain Integer, and different
default type defaulting.

I doubt anyone relies on the current behaviour, and I think it's just an
oversight (i.e. bug) in the language definition anyway.

So I suggest we shouldn't be strictly backwards compatible in this case.


More information about the Libraries mailing list