-
Notifications
You must be signed in to change notification settings - Fork 52
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
New module Text.Parsing.Parser.String.Basic #142
Conversation
The |
9c53c83
to
0c6de10
Compare
5b2f645
to
eb81202
Compare
New functions - `Parser.String.Basic.number` - `Parser.String.Basic.intDecimal` Moved the `Parser.Token` parsers `digit`, `hexDigit`, `octDigit`, `upper`, `space`, `letter`, `alphaNum` into the new module `Parser.String.Basic`.
eb81202
to
eeb746e
Compare
src/Text/Parsing/Parser.purs
Outdated
@@ -161,8 +161,6 @@ instance plusParserT :: Monad m => Plus (ParserT s m) where | |||
|
|||
instance alternativeParserT :: Monad m => Alternative (ParserT s m) | |||
|
|||
instance monadZeroParserT :: Monad m => MonadZero (ParserT s m) |
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.
I thought we weren't removing these until v0.15.0 comes out?
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.
Oh? Thanks @JordanMartinez good catch.
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.
I can't find a reference for this, can you post a link please @JordanMartinez ?
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.
See purescript/purescript-lists#176
We have a couple of MonadZero
issues like that scattered throughout the core and contrib libs.
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.
There’s a strict requirement that we don’t remove the warning in core libraries, and we’ve largely stuck to that in non-core libraries too. But there’s not a requirement that we keep these in place other than the core org (I’ve removed it elsewhere when making breaking changes 😅)
eeb746e
to
0cfe422
Compare
Personally speaking, I don't know why we even have the Haskell and Java parsers included with this library. They feel like they belong in some companion package, like |
@jamesdbrock I noticed this released as |
Yeah I've been thinking that too.
I'm re-exporting the functions from the old modules so there's no breaking change. |
Description of the change
New module Text.Parsing.Parser.String.Basic
New functions
Parser.String.Basic.number
Parser.String.Basic.intDecimal
Moved the
Parser.Token
parsersdigit
,hexDigit
,octDigit
,upper
,space
,letter
,alphaNum
into the new moduleParser.String.Basic
.Resolves the issues #73 #115 . Actually it doesn't resolve them directly because we still have the
float
token parser which was failing to parse correctly. We're keeping thefloat
token parser which is documented to conform to “the grammar rules of the Haskell report,” but who knows if that's really true or not. Instead we've added a newnumber
parser for parsing aNumber
, which I think is what most people want anyway.Checklist: