-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
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.
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. |
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.
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 |
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 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 |
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.
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). |
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'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.
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? |
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.
Good idea, I went ahead and fixed the merge conflict. This looks good to me now, thank you!
Thanks! |
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".