-
Notifications
You must be signed in to change notification settings - Fork 20
Re-export main API from single module and remove Text.Parsing prefix per #78 #89
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
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d5183d1
Move existing StringParser module to Common
chtenb 636d2f1
re-export other modules in main API
chtenb fcac2eb
Remove Text.Parsing prefex per #78
chtenb fe8a01c
make exports explicit
chtenb 3fcfac9
update changelog
chtenb 2bada4a
fix up
chtenb 42f524d
fix formatting
chtenb 915fb16
Rename Common to Parser
chtenb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module StringParser | ||
( module StringParser.Common | ||
, module StringParser.Combinators | ||
, module StringParser.CodePoints | ||
) where | ||
|
||
import StringParser.Common (ParseError, Parser(..), Pos, PosString, fail, printParserError, runParser, unParser) | ||
import StringParser.Combinators (assertConsume, between, chainl, chainl1, chainr, chainr1, choice, endBy, endBy1, fix, lookAhead, many, many1, many1Till, manyTill, option, optionMaybe, optional, sepBy, sepBy1, sepEndBy, sepEndBy1, try, tryAhead, withError, (<?>)) | ||
import StringParser.CodePoints (alphaNum, anyChar, anyCodePoint, anyDigit, anyLetter, char, codePoint, eof, lowerCaseChar, noneOf, oneOf, regex, satisfy, satisfyCodePoint, skipSpaces, string, upperCaseChar, whiteSpace) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Text/Parsing/StringParser.purs → src/StringParser/Common.purs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe this should be
StringParser.Parser
since it specifically deals with the parser type?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 named it Common because it contains more than just the Parser type, namely all the things that the CodeUnits parser and the CodePoints parser share but are not in Combinators.
But you have a lot more knowledge about naming conventions in the ecosystem, so should it be Parser instead? You tell me 😄
Uh oh!
There was an error while loading. Please reload this page.
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 may be misunderstanding you; all I see in this file are the parser type and instances, plus
runParser
andunParser
for running the parser,fail
for setting an error message, andprintParserError
for unpacking the error message.I guess my question is — what is being shared here beyond the
Parser
type and helpers for its error messages? If it's nothing, then I thinkStringParser.Parser
is a more informative module name. If it's more than that, thenCommon
makes more sense.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.
That's pretty much it as you can see. So it's decided then :)