#16403: Add isBinDigit to Data.Char

"GHC" <[email protected]> Thu, 07 Mar 2019 12:13:16 -0000
Newsgroups gmane.comp.lang.haskell.glasgow.bugs
Message-ID <[email protected]>
--===============3685589933581421017==
Content-Type: multipart/related;
 boundary="===============2419077544645675490=="

--===============2419077544645675490==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

#16403: Add isBinDigit to Data.Char
-------------------------------------+-------------------------------------
           Reporter:  hesiod         |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:                 |           Version:  8.6.4
  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 {{{Data.Char}}} module contains helper functions that determine
 whether a Char is a decimal, octal or hexadecimal digit ({{{isDigit}}},
 {{{isOctDigit}}}, {{{isHexDigit}}}). A similar helper function for binary
 digits is not included for no apparent reason (maybe because the number
 parsers in the {{{Numeric}}} module also don't support binary digits?).

 The implementation for such a {{{isBinDigit}}} should be trivial, aside
 from performance considerations: {{{isDigit}}} and friends perform the
 test using only subtraction and an unsigned comparison, I'm not sure
 whether {{{isBinDigit}}} offers any different performant implementations.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16403>