-
Notifications
You must be signed in to change notification settings - Fork 275
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
Improving documentation #1038
Comments
I've done the main part of the work on |
Thanks for doing this, @Lev135! I've taken a brief look at the changes, and most of seems straightforward and uncontroversial. The only part that I am wondering about are the parts of the patch that remove certain pieces of documentation for various things, such as |
About ASetter etc.:
I don't understand what this sentence should clarify and even what does it mean
It's not clear, what does "consume direcly to perform a mapping" meen.
These two sentence seems to contradict each other. If it's really useful, why Summarising, maybe add something like the following to the section title,
|
Also I've removed the following notes to
Since the type signature of |
I'd like to ask you also, if my note to the
is appropriate? Maybe I misunderstood something and they are indeed related (wrong doc is worse, than missed doc) |
Regarding this:
My understanding is that several type ASetter s t a b = (a -> Identity b) -> s -> Identity t
type Setter s t a b = forall f. Settable f => (a -> f b) -> s -> f t There are various
When this says "most user code", I think it means that most code that constructs optics won't need to care about Admittedly, this is a tricky nuance to convey through documentation. Do you have a suggestion on how to communicate this information? Your suggested "Rank-1 representation" re-phrasing comes close, although I do think it's worth saying something about type inference and consuming-versus-producing there. |
This isn't wrong necessarily, but I don't think it adds much, and I would prefer not including it. The fact is that most |
Maybe we should add this:
and
straight-forward in the documentation to be more clear. Also we could add a note that it's can be useful to store setter in container. This can lead to a long enough comment, but here I think it's worth enough and it's not so long if we add this only in section heading. If you also think so, maybe you could rephrase your comments to me and maybe add something more based on your expirience and feeling this in the format of documentation? It definetly would be better than all I can do for it, because my expirience in lenses is far less, than yours. |
That's exactly what I wanted to point at. It seems also, based on your table, that there's a convention to use |
Of course, when I said "looks like" I meant that it could be occidently considered to follow these conventions and not that it contains the same symbols. Also, I don't see more examples of this kind in the table |
I would support adding a top-level comment somewhere that describes the purpose of the I generally like the phrasing that you chose, so feel free to go with that. It's possible that I will want to rephrase it slightly once I see it next to the surrounding documentation, but it's much easier to give suggestions of that sort in a GitHub PR review comment.
Yeah, |
I argue it would be very useful to reorganize
lens
haddock. I think it would be great if it will be rearranged in some uniform way. The great example of organization (in my opinion) isoptics
library. Of course, making huge lens documentation so well-structured as the tiny (in comparison withlens
)optics
package has is not very easy. However, I think we should try, since any step in this way is an essential improvement. I can do this work if the owners of this repo won't be too critical on these changes. I'd like to have a green light before doing the most of the work.To be more concrete I've started the work on restructuring
Setter
s. You can see the WIP situation here.Also you can see it in a rendered html version here (and compare it with the current doc, abailable on Hackage).
The text was updated successfully, but these errors were encountered: