Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upStep 1 toward Prism documentation: a "how to" module for Prisms. #88
Conversation
marick
added some commits
Apr 28, 2018
marick
referenced this pull request
Apr 28, 2018
Open
Update README to talk about impredicativity #77
paf31
reviewed
Apr 30, 2018
| "purescript-prelude": "^3.3.0", | ||
| "purescript-console": "^3.0.0", | ||
| "purescript-profunctor-lenses": "^3.8.0", | ||
| "purescript-record-show": "^0.4.0", |
This comment has been minimized.
This comment has been minimized.
paf31
Apr 30, 2018
Member
I would like to avoid adding non-contrib libraries as dependencies if we can help it.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
marick
May 1, 2018
Collaborator
Is this an issue for the next release?
If not, I suggest we err on the side of clarity.
This comment has been minimized.
This comment has been minimized.
marick
May 6, 2018
Collaborator
I was about to fix the use of purescript-record-show, but it seems to me purescript-color may also be non-contrib. https://pursuit.purescript.org/packages/purescript-colors/4.3.0/docs/Color Is it?
Removing Color would be more work than I'm willing to do. Plus there's value in more realistic examples.
This comment has been minimized.
This comment has been minimized.
dwhitney
May 7, 2018
came here to +1 this. I see where @paf31 is coming from, but.... Lenses are so simple and helpful, yet like @marick has said on Twitter - it took me so long to wrap my head around them and these simple examples would have made the mental leap almost instant. At the moment, I'm somewhat reluctant to use lenses on my project for fear that others will come on and be confused and unproductive.
This comment has been minimized.
This comment has been minimized.
paf31
May 7, 2018
Member
The reason is that is makes updating libraries unnecessarily difficult for maintainers, since most contrib libraries fall on the core library maintainers to update anyway. colors is actually a counterexample since it was added as a dependency of drawing accidentally already, so I have no issue with adding a (dev-)dependency on colors.
In any case, these should be dev-dependencies, not actual dependencies, since they're only used in documentation. In fact, I don't know if they need to be dependencies at all. The documentation can just instruct the user to bower install whatever it needs.
This comment has been minimized.
This comment has been minimized.
marick
May 7, 2018
Collaborator
I'll move those to the examples README if required. Before then, a question: did you notice that the bower.json file isn't the top-level one, but one within examples?
So, putting:
bower i purescript-color
bower i purescript-show-record
... into examples/README.md is really the same as putting them in bower.json, except it's even less likely that a maintainer will notice the incompatibility. (In either case, users will.)
This comment has been minimized.
This comment has been minimized.
paf31
May 7, 2018
•
Member
No I didn't notice, thanks for pointing that out. In that case, I think this is fine.
This comment has been minimized.
This comment has been minimized.
paf31
May 7, 2018
Member
It does unfortunately mean that they might not get updated at the same time as the source files during major version changes, while we wait for those libraries to get updated.
This comment has been minimized.
This comment has been minimized.
garyb
May 7, 2018
Member
I do this kind of thing (or have done in the past at least) with the examples for Halogen. I think it's a good compromise between making useful examples and not being constrained by other libraries when wanting to make a new release.
marick
merged commit 02b1693
into
purescript-contrib:master
May 7, 2018
1 check passed
This comment has been minimized.
This comment has been minimized.
|
Please squash merge, thanks. |
marick commentedApr 28, 2018
I've created an
examplesdirectory and populated it with a file that shows how to use prisms on sum types.Once this is approved, I'll add text and examples to the Prism API documentation.