-
Notifications
You must be signed in to change notification settings - Fork 51
Add Text.Parsing.Parser.Language and Token modules. #27
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
Conversation
This commit adds the `Text.Parsing.Parser.Language` and `Text.Parsing.Parser.Token` modules. This is a straight port of modules of the same name in Haskell's `parsec` library. This commit also adds the `(<??>)` combinator, which acts like a flipped `(<?>)`. It is convenient to use with monadic parsers: ```purescript foo :: Parser String Unit foo = "some message" <??> do string "foo" bar pure unit ```
One small problem I couldn't figure out was the functions near the bottom of the I tried to put them in the
I moved the functions in question to the top level and the problems disappered. |
@@ -29,7 +29,9 @@ | |||
"purescript-lists": "^0.7.0", | |||
"purescript-maybe": "^0.3.0", | |||
"purescript-strings": "~0.7.0", | |||
"purescript-transformers": "^0.8.1" | |||
"purescript-transformers": "^0.8.1", | |||
"purescript-unicode": "git://github.com/purescript-contrib/purescript-unicode#unicode", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should publish this to bower. Never actually commit git dependencies, especially when it's not a SHA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelficarra Thanks for taking a look at this PR.
I am planning to publish purescript-unicode to bower, but I am waiting for this PR to get reviewed.
I don't think I explained it well enough in the PR comments, but this PR shouldn't be merged until purescript-unicode is released. (Or if we decide not to use the purescript-unicode dependency, then it doesn't matter.)
What @michaelficarra said, plus a few code comments from me, plus:
Thanks very much for working on this! |
@paf31, Thanks for taking the time to review the code. I have made the following changes:
Now this PR should be ready for merging. (Or at least additional review.) |
Sorry, I'm catching up on PRs. I'll get to this soon! |
No worries! |
Add Text.Parsing.Parser.Language and Token modules.
Thanks very much! And sorry again for the delay. |
This commit adds the
Text.Parsing.Parser.Language
andText.Parsing.Parser.Token
modules. This is a straight port of modulesof the same name in Haskell's
parsec
library.Text.Parsec.Language
Text.Parsec.Token
This commit also adds the
(<??>)
combinator, which acts like a flipped(<?>)
. It is convenient to use with monadic parsers: