Skip to content

readHexRational missing from Numeric

The HexFloatLiterals extension was merged as result of https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0004-hexFloats.rst

As part of this proposal showHFloat was added to Numeric to output floating points in hexFloat format, unfortunately, no one seems to have remembered to add readHexRational or a similar function to parse hexFloats to Numeric. This leads to the awkward scenario that I can easily produce hexFloat values, but have no way to parse them from String/Text data...

All the code already exists in compiler/util/Utils.hs, someone just needs to cherry pick the implementation add add it to Numeric in base.

Trac metadata
Trac field Value
Version 8.6.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information