Skip to content

Port learning repo's syntax examples to this repo #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

Merged
merged 5 commits into from
Jun 5, 2020
Merged

Port learning repo's syntax examples to this repo #52

merged 5 commits into from
Jun 5, 2020

Conversation

JordanMartinez
Copy link
Contributor

Fixes #51.

While adding CI would be nice, this is at least better than what we have now.

@thomashoneyman
Copy link
Contributor

thomashoneyman commented Jun 2, 2020

Thanks for adding this, @JordanMartinez -- I'm sorry for such a late response, I didn't realize I never followed up.

I'm glad to add examples to this repository, and I agree that adding CI would be nice. What do you think of moving these examples into a tests file, which would also give the benefit of a compiler-checked assertion of the output of these functions?

For example:

module Test.Example where

...examples...

We could then trim the README to have a couple syntax examples with a longer explanation of how they work + point users to the tests for a larger set of examples (that are tested to work, unlike READMEs which tend to fall out of date).

@thomashoneyman thomashoneyman self-requested a review June 2, 2020 21:52
@thomashoneyman thomashoneyman self-assigned this Jun 2, 2020
@JordanMartinez
Copy link
Contributor Author

How's this?

  • I've moved the code to test/Examples.purs
  • Point readers to it via a relative link on the ReadMe
  • Added a somewhat more complicated example of one parsing a small amount of CSV with some special handling

I don't think the module should be Test.Examples because purescript/package-sets#2 may one day get implemented.

@thomashoneyman thomashoneyman merged commit bd72dd7 into purescript-contrib:master Jun 5, 2020
@JordanMartinez JordanMartinez deleted the addExamples branch April 26, 2021 19:36
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.

Port string-parsers syntax guide to this repo
2 participants