Skip to content

Data.CodePoint.Unicode Predicates #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mkohlhaas opened this issue Mar 10, 2022 · 2 comments
Closed

Data.CodePoint.Unicode Predicates #151

mkohlhaas opened this issue Mar 10, 2022 · 2 comments

Comments

@mkohlhaas
Copy link
Contributor

Hi James,

Awesome library. Awesome presentation on PureConf!

Is there any reason why the predicates from Data.CodePoint.Unicode are not exposed in Text.Parsing.Parser.String.Basic ?

I was especially looking for a lower parser as there is an upper parser.

Thanks!

@jamesdbrock
Copy link
Member

Hi @mkohlhaas , thanks!

Yeah it would make sense for there to be a lower parser in that module. I would accept a PR for that. In the meantime you can define it yourself in your program:

lower :: forall m. Monad m => ParserT String m Char
lower = satisfy (isLower <<< codePointFromChar) <?> "lowercase letter"

@jamesdbrock
Copy link
Member

Because it’s so easy for users to define their own unicode-predicate-based parsers, I don’t feel that it’s urgent to provide parsers beyond a small basic set of unicode-predicate-based parsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants