Proposal: modify `Read` instances for `Float` and `Double`

Iavor Diatchki iavor.diatchki at
Tue Feb 28 19:07:28 UTC 2017


I am working on a small GHC extension to support floating point literals in
hexadecimal notation (,
which is similar to what's available in other languages.

To support this change, I would like to propose that we modify the `Read`
instances for `Float` and `Double` to parse literals in the new notation.

This may affect existing programs---although it doesn't seem very likely.
Here is an example:

current behavior:

reads "0x10p10" = [(16.0,"p10")]

new behavior:

reads "0x10p10" = [(16384,"")]

What do people think?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list