[GHC] #16216: readHexRational missing from Numeric

#16216: readHexRational missing from Numeric -------------------------------------+------------------------------------- Reporter: merijn | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: | Version: 8.6.3 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16216 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16216: readHexRational missing from Numeric -------------------------------------+------------------------------------- Reporter: merijn | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by merijn): As carter pointed out on IRC, (and asked me to echo here) this would also improve our IEEE754 compliance. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16216#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16216: readHexRational missing from Numeric -------------------------------------+------------------------------------- Reporter: merijn | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by toonn): I've started [https://gitlab.haskell.org/ghc/ghc/merge_requests/268/pipelines work on this here]. I've tried to copy `readFloat` as closely as possible. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16216#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC