Skip to content

Parsing.String.Replace #188

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
merged 1 commit into from
Apr 23, 2022
Merged

Parsing.String.Replace #188

merged 1 commit into from
Apr 23, 2022

Conversation

jamesdbrock
Copy link
Member

@jamesdbrock jamesdbrock commented Apr 17, 2022

Module Parsing.String.Replace

Copied from https://github.com/jamesdbrock/purescript-parsing-replace


Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

@jamesdbrock jamesdbrock marked this pull request as draft April 17, 2022 05:15
@jamesdbrock jamesdbrock marked this pull request as ready for review April 17, 2022 12:33
@jamesdbrock jamesdbrock marked this pull request as draft April 17, 2022 16:59
@jamesdbrock jamesdbrock marked this pull request as ready for review April 18, 2022 04:49
Base automatically changed from monadstate to main April 18, 2022 05:46
@jamesdbrock jamesdbrock force-pushed the replace branch 6 times, most recently from b085311 to c8e3fa3 Compare April 18, 2022 10:54
=> (MonadRec m)
=> String
-> ParserT String m a
-> m (Maybe (T3 String a String))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a record be more appropriate rather than T3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe so? Like if this returned m (Maybe ({ prefix :: String, cap :: a, suffix :: String}))?

I kind of like the positional prefix /\ cap /\ suffix syntax because the relationship between the three return values is positional.

@jamesdbrock jamesdbrock force-pushed the replace branch 3 times, most recently from 55b1123 to dbf9344 Compare April 23, 2022 15:26
@jamesdbrock jamesdbrock merged commit a49594d into main Apr 23, 2022
@jamesdbrock jamesdbrock deleted the replace branch April 23, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants