@@ -14,11 +14,11 @@ module Streamly.Internal.Unicode.Char.Parser
1414 (
1515 -- * Generic
1616 char
17− , charAnyCase
17+ , charIgnoreCase
1818
1919 -- * Sequences
2020 , string
21− , stringAnyCase
21+ , stringIgnoreCase
2222 , dropSpace
2323 , dropSpace1
2424
@@ -33,7 +33,7 @@ module Streamly.Internal.Unicode.Char.Parser
3333 , lower
3434 , upper
3535 , mark
36− , print
36+ , printable
3737 , punctuation
3838 , separator
3939 , space
@@ -43,7 +43,7 @@ module Streamly.Internal.Unicode.Char.Parser
4343 , digit
4444 , octDigit
4545 , hexDigit
46− , number
46+ , numeric
4747
4848 -- * Numeric
4949 , signed
@@ -57,7 +57,6 @@ import Control.Applicative (Alternative(..))
5757import Control.Monad.Catch (MonadCatch)
5858import Data.Bits (Bits, (.|.), shiftL)
5959import Data.Char (ord)
60−import Prelude hiding (print)
6160import Streamly.Internal.Data.Parser (Parser)
6261
6362import qualified Data.Char as Char
@@ -77,7 +76,7 @@ import qualified Streamly.Internal.Data.Parser as Parser
7776
7877-- XXX It may be possible to implement faster predicates for ASCII byte stream.
7978-- We can measure if there is a signficant difference and if so we can add such
80−-- predicates to Streamly.Unicode.Char.Parser.Latin1.
79+-- predicates to Streamly.Unicode.Parser.Latin1.
8180--
8281#define CHAR_PARSER_SIG(NAME) NAME :: MonadCatch m => Parser m Char Char
8382-- XXX Need to use the predicates from Unicode.Char module/unicode-data package
@@ -101,8 +100,8 @@ CHAR_PARSER(alpha,isAlpha)
101100CHAR_PARSER_SIG(alphaNum)
102101CHAR_PARSER(alphaNum,isAlphaNum)
103102
104−CHAR_PARSER_SIG(print)
105−CHAR_PARSER(print,isPrint)
103+CHAR_PARSER_SIG(printable)
104+CHAR_PARSER(printable,isPrint)
106105
107106CHAR_PARSER_SIG(digit)
108107CHAR_PARSER(digit,isDigit)
@@ -119,8 +118,8 @@ CHAR_PARSER(letter,isLetter)
119118CHAR_PARSER_SIG(mark)
120119CHAR_PARSER(mark,isMark)
121120
122−CHAR_PARSER_SIG(number)
123−CHAR_PARSER(number,isNumber)
121+CHAR_PARSER_SIG(numeric)
122+CHAR_PARSER(numeric,isNumber)
124123
125124CHAR_PARSER_SIG(punctuation)
126125CHAR_PARSER(punctuation,isPunctuation)
@@ -154,9 +153,9 @@ char c = Parser.satisfy (== c)
154153
155154-- XXX Case conversion may lead to change in number of chars
156155-- | Match a specific character ignoring case.
157−{-# INLINE charAnyCase #-}
158−charAnyCase :: MonadCatch m => Char -> Parser m Char Char
159−charAnyCase c = Parser.lmap Char.toLower (Parser.satisfy (== Char.toLower c))
156+{-# INLINE charIgnoreCase #-}
157+charIgnoreCase :: MonadCatch m => Char -> Parser m Char Char
158+charIgnoreCase c = Parser.lmap Char.toLower (Parser.satisfy (== Char.toLower c))
160159
161160--------------------------------------------------------------------------------
162161-- Character sequences
@@ -168,8 +167,8 @@ string = Parser.list
168167
169168-- XXX Not accurate unicode case conversion
170169-- | Match the input with the supplied string and return it if successful.
171−stringAnyCase :: MonadCatch m => String -> Parser m Char String
172−stringAnyCase s = Parser.lmap Char.toLower (Parser.list (map Char.toLower s))
170+stringIgnoreCase :: MonadCatch m => String -> Parser m Char String
171+stringIgnoreCase s = Parser.lmap Char.toLower (Parser.list (map Char.toLower s))
173172
174173-- | Drop /zero/ or more white space characters.
175174dropSpace :: MonadCatch m => Parser m Char ()