import Prelude
import Prelude(Char,String)
import Char
+import NHC.FFI (CInt)
+foreign import ccall unsafe "WCsubst.h u_gencat" wgencat :: CInt -> Int
#endif
-- | Convert a single digit 'Char' to the corresponding 'Int'.
isAsciiUpper c = c >= 'A' && c <= 'Z'
#endif
-#ifndef __NHC__
-- | Unicode General Categories (column 2 of the UnicodeData table)
-- in the order they are listed in the Unicode standard.
-- | Retrieves the general Unicode category of the character.
generalCategory :: Char -> GeneralCategory
-#ifdef __GLASGOW_HASKELL__
+#if defined(__GLASGOW_HASKELL__) || defined(__NHC__)
generalCategory c = toEnum (wgencat (fromIntegral (ord c)))
#endif
#ifdef __HUGS__
LineSeparator -> True
ParagraphSeparator -> True
_ -> False
-#endif /* !__NHC__ */
#ifdef __NHC__
-- dummy implementation
Text/Html/BlockTable.hs Text/Html.hs Text/Printf.hs \
Text/Read.hs Text/Show.hs Text/Show/Functions.hs \
Text/ParserCombinators/ReadP.hs Data/Version.hs \
- Text/Regex/Posix.hsc Text/Regex.hs
+ Text/Regex/Posix.hsc Text/Regex.hs \
+ WCsubst.c
# Text/ParserCombinators/ReadPrec.hs