X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FUnicode.hs;h=d5846c1cee80243b2531676d1ed8d8387c8dd7b9;hb=bb534f206682be14daf72b33c6105ab27295c6ac;hp=a98ce242d3a8039f1348cec1e77c6093e063e25d;hpb=3bc707020c8d0f7a11b652c38d33f1d9c87d3ae7;p=ghc-base.git diff --git a/GHC/Unicode.hs b/GHC/Unicode.hs index a98ce24..d5846c1 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 @@ -30,7 +30,7 @@ import GHC.Int import GHC.Word import GHC.Num (fromInteger) -#include "ghcconfig.h" +#include "HsBaseConfig.h" -- | Selects the first 128 characters of the Unicode character set, -- corresponding to the ASCII character set. @@ -77,6 +77,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 +121,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