X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FUnicode.hs;h=52d14f37c8964eea9a20bd29ab2472cf7b62c924;hb=9fcd4e60afbfe43c62372cd75fd940c2c4294265;hp=5da35411a021c927012b0f850a732fe716b19944;hpb=fed6da8693ae3c1f6059970b694ef0adf1204477;p=haskell-directory.git diff --git a/GHC/Unicode.hs b/GHC/Unicode.hs index 5da3541..52d14f3 100644 --- a/GHC/Unicode.hs +++ b/GHC/Unicode.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Unicde @@ -15,6 +15,7 @@ -- ----------------------------------------------------------------------------- +-- #hide module GHC.Unicode ( isAscii, isLatin1, isControl, isAsciiUpper, isAsciiLower, @@ -30,7 +31,7 @@ import GHC.Int import GHC.Word import GHC.Num (fromInteger) -#include "config.h" +#include "HsBaseConfig.h" -- | Selects the first 128 characters of the Unicode character set, -- corresponding to the ASCII character set. @@ -77,6 +78,15 @@ isUpper :: Char -> Bool isLower :: Char -> Bool -- | Selects alphabetic Unicode characters (letters). +-- +-- Note: the Haskell 98 definition of 'isAlpha' is: +-- +-- > isAlpha c = isUpper c || isLower c +-- +-- the implementation here diverges from the Haskell 98 +-- definition in the sense that Unicode alphabetic characters which +-- are neither upper nor lower case will still be identified as +-- alphabetic by 'isAlpha'. isAlpha :: Char -> Bool -- | Selects alphabetic or numeric digit Unicode characters. @@ -112,7 +122,7 @@ toLower :: Char -> Char -- ----------------------------------------------------------------------------- -- Win32 implementation -#if (defined(HAVE_WCTYPE_H) && HAVE_ISWSPACE && defined(HTYPE_WINT_T) || mingw32_TARGET_OS +#if (defined(HAVE_WCTYPE_H) && HAVE_ISWSPACE && defined(HTYPE_WINT_T)) || mingw32_HOST_OS -- Use the wide-char classification functions if available. Glibc -- seems to implement these properly, even for chars > 0xffff, as long