X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FUnicode.hs;h=b34f677069d1f12fb6d6514192b0b33886747122;hb=f98950484a7cb01e43352e3d88277a2784cd58bf;hp=d90c96e3dd3a6aa9809cebd77ab0dce21c34a9db;hpb=280f54592dfa7af126943f65dce075890d6240bc;p=ghc-base.git diff --git a/GHC/Unicode.hs b/GHC/Unicode.hs index d90c96e..b34f677 100644 --- a/GHC/Unicode.hs +++ b/GHC/Unicode.hs @@ -1,6 +1,7 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} {-# OPTIONS -#include "WCsubst.h" #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Unicode @@ -31,7 +32,6 @@ module GHC.Unicode ( import GHC.Base import GHC.Real (fromIntegral) import Foreign.C.Types (CInt) -import GHC.Num (fromInteger) #include "HsBaseConfig.h" @@ -63,8 +63,8 @@ isControl :: Char -> Bool -- (letters, numbers, marks, punctuation, symbols and spaces). isPrint :: Char -> Bool --- | Selects white-space characters in the Latin-1 range. --- (In Unicode terms, this includes spaces and some control characters.) +-- | Returns 'True' for any Unicode space character, and the control +-- characters @\\t@, @\\n@, @\\r@, @\\f@, @\\v@. isSpace :: Char -> Bool -- isSpace includes non-breaking space -- Done with explicit equalities both for efficiency, and to avoid a tiresome