Fixes isAlphaNum re. isAlpha/isNumber and doc fix (trac issue #10412)

Authored by Azel on Apr 13 2018, 11:05 PM.



Corrects the inconsistency between Data.Char.isAlphaNum,
Data.Char.isAlpha and Data.Char.isNumber. Indeed, isAlphaNum was
returning True not only when isAlpha or isNumber returned True but
also when isMark did. The selectors for the Mn, Mc and Me general
categories where removed from the macro generating u_iswalnum in
Also, Data.Char.isAlphaNum's documentation was changed to state that
isAlphaNum returns true not only for Unicode number digits but for
Unicode numbers in general in Unicode.hs.

Signed-off-by: ARJANEN Loïc Jean David <>

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Azel created this revision.Apr 13 2018, 11:05 PM
Azel requested review of this revision.Apr 14 2018, 2:11 AM

Yes, this seems reasonable to me. I'll add a test.

Thanks for picking this up!

bgamari accepted this revision.Apr 19 2018, 11:44 AM
This revision is now accepted and ready to land.Apr 19 2018, 11:44 AM
This revision was automatically updated to reflect the committed changes.