[commit: ghc] master: Implement the basics of hex floating point literals (b0b80e9)
git at git.haskell.org
git at git.haskell.org
Thu Nov 2 17:30:58 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b0b80e90c0382a6cdb61c96c860feac27482d6e8/ghc
>---------------------------------------------------------------
commit b0b80e90c0382a6cdb61c96c860feac27482d6e8
Author: Iavor Diatchki <iavor.diatchki at gmail.com>
Date: Thu Nov 2 12:02:22 2017 -0400
Implement the basics of hex floating point literals
Implement hexadecmial floating point literals.
The digits of the mantissa are hexadecimal.
The exponent is written in base 10, and the base for the exponentiation is 2.
Hexadecimal literals look a lot like ordinary decimal literals, except that
they use hexadecmial digits, and the exponent is written using `p` rather than `e`.
The specification of the feature is available here:
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0004-hexFloats.rst
For a discussion of the various choices:
https://github.com/ghc-proposals/ghc-proposals/pull/37
Reviewers: mpickering, goldfire, austin, bgamari, hvr
Reviewed By: bgamari
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D3066
>---------------------------------------------------------------
b0b80e90c0382a6cdb61c96c860feac27482d6e8
compiler/main/DynFlags.hs | 1 +
compiler/parser/Lexer.x | 26 ++++++++--
compiler/utils/Util.hs | 59 +++++++++++++++++++++-
docs/users_guide/8.4.1-notes.rst | 5 ++
docs/users_guide/glasgow_exts.rst | 44 ++++++++++++++++
libraries/base/Numeric.hs | 48 ++++++++++++++++++
libraries/base/changelog.md | 2 +
.../ghc-boot-th/GHC/LanguageExtensions/Type.hs | 1 +
testsuite/tests/driver/T4437.hs | 3 +-
.../tests/parser/should_run/HexFloatLiterals.hs | 16 ++++++
.../parser/should_run/HexFloatLiterals.stdout | 4 ++
testsuite/tests/parser/should_run/all.T | 1 +
12 files changed, 203 insertions(+), 7 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b0b80e90c0382a6cdb61c96c860feac27482d6e8
More information about the ghc-commits
mailing list