Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Add guide #31

Merged
merged 5 commits into from
Jan 14, 2019
Merged

Add guide #31

merged 5 commits into from
Jan 14, 2019

Conversation

anttih
Copy link
Contributor

@anttih anttih commented Aug 10, 2018

Add guide from the purescript/documentation repo into the README. See the discussion here purescript/documentation#96

I think it's better to have the documentation directly in the README so it shows up in pursuit and there's a better chance that it will be kept up-to-date.

I've reworded the first paragraph slightly to refer to the "guide" instead of "post". See the relevant commit. The pursuit link now also refers to "API documentation".

Copy link
Member

@garyb garyb left a comment

Choose a reason for hiding this comment

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

Thanks for opening this, I have a few suggestions though, as the article doesn't quite work as a README for this library in its current form, IMO anyway 🙂

README.md Outdated

Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-generics-rep).
The PureScript compiler has supported _generic deriving_ in some form since version 0.7.3, thanks to [Gershom Bazerman](http://gbaz.github.io/). However, since then, it has gone through several iterations, and the current version (implemented in the `purescript-generics-rep` library) makes it possible to have the compiler derive a wide variety of boilerplate code based on types. One example of this is the serialization and deserialization of JSON, and in the following guide we'll show how to use the [`purescript-foreign-generic`](https://github.com/paf31/purescript-foreign-generic) library to create such functions using generics.
Copy link
Member

Choose a reason for hiding this comment

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

We can probably change/remove the part here that refers to the current version and names this library.

README.md Outdated
append = genericAppend
```

### Handling Foreign Data
Copy link
Member

Choose a reason for hiding this comment

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

I would probably drop everything from here on, since it's not really related to this library anymore - it belongs in the purescript-foreign-generic docs/readme perhaps.


One application of this technique is to produce and consume JSON for use with JSON web services, using generics to reduce the amount of boilerplate model code needed.

### Performance Concerns
Copy link
Member

Choose a reason for hiding this comment

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

Aside from this part, which is still very relevant 😄


## API Documentation

API documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-generics-rep).
Copy link
Member

Choose a reason for hiding this comment

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

I'd perhaps add another section at the end linking to purescript-foreign-generic (and perhaps other relevant libraries if we come up with some - there's an argonaut one or something too I think), rather than mentioning them at any point before.

@anttih
Copy link
Contributor Author

anttih commented Sep 22, 2018

Anything else I should change? There's now also a conflict because an example link was added. The guide adds some examples so should we move the simple-json doc link to related libraries?

Copy link
Contributor

@hdgarrood hdgarrood left a comment

Choose a reason for hiding this comment

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

Good idea, I went ahead and fixed the merge conflict. This looks good to me now, thank you!

@garyb
Copy link
Member

garyb commented Jan 14, 2019

Thanks!

@garyb garyb merged commit 0d42177 into purescript-deprecated:master Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants