Proposal: Improve Read Integer

Ian Lynagh igloo at earth.li
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
> > http://hackage.haskell.org/trac/ghc/ticket/4500
> > Currently, according to H98, H2010, GHC and hugs,
> >    reads "1.2" :: [(Integer, String)]
> > is
> >    []
> > whereas I would expect it to be
> >    [(1,".2")]
> > http://hackage.haskell.org/trac/ghc/attachment/ticket/4500/read-integer.dpatch
> 
> 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.


Thanks
Ian



More information about the Libraries mailing list