Character classification
\begin{code}
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
module Ctype
( is_ident -- Char# -> Bool
, is_symbol -- Char# -> Bool
#include "HsVersions.h"
-import DATA_INT ( Int32 )
-import DATA_BITS ( Bits((.&.)) )
-import Char ( ord, chr )
+import Data.Int ( Int32 )
+import Data.Bits ( Bits((.&.)) )
+import Data.Char ( ord, chr )
\end{code}
Bit masks
'\6' -> 0 -- \006
'\7' -> 0 -- \007
'\8' -> 0 -- \010
- '\9' -> cAny + cSpace -- \t
- '\10' -> cSpace -- \n (not allowed in strings, so !cAny)
- '\11' -> cAny + cSpace -- \v
- '\12' -> cAny + cSpace -- \f
- '\13' -> cAny + cSpace -- ^M
+ '\9' -> cSpace -- \t (not allowed in strings, so !cAny)
+ '\10' -> cSpace -- \n (ditto)
+ '\11' -> cSpace -- \v (ditto)
+ '\12' -> cSpace -- \f (ditto)
+ '\13' -> cSpace -- ^M (ditto)
'\14' -> 0 -- \016
'\15' -> 0 -- \017
'\16' -> 0 -- \020