Skip to content

Some documentation on genericTraverse and friends #384

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 1 commit into from
Feb 17, 2022

Conversation

aspiwack
Copy link
Member

Just small docstring fixes.

@sjoerdvisscher, you pioneered the use of Yoneda and Curried for
fusion. Could you write the missing bit of documentation?

@treeowl
Copy link
Collaborator

treeowl commented Feb 15, 2022

I'm the one who wrote that, but I'd point to @ekmett. The Applicative involved was stolen from lens, where it's used to implement the aptly-named confusing. By applying it in a finer-grained manner here (generic representations rather than whole containers), we maximize the benefit. It's really all about avoiding unnecessarily stacked fmap applications. I can try to explain a bit later today, but it's fine if @sjoerdvisscher gets to it first.

@sjoerdvisscher
Copy link
Member

Right, I don't think I understand this enough to document it. I played around enough with the types at some point to get what was going on, but that has long since been garbage collected from my brain.

@aspiwack
Copy link
Member Author

@treeowl

I'm the one who wrote that

Indeed, I now realise that #316 was coauthored 🙂 (I'd like to bring it up to master, now, but it's a non-trivial amount of work to merge master in it. I don't really have time to do so, would you?).

Regarding this PR: I don't necessarily ask for a detailed explanation (though it would be welcome), but enough to get an intuition of why these types specifically?

@treeowl
Copy link
Collaborator

treeowl commented Feb 15, 2022

I will work on bringing that branch (or its main ideas) up to master as soon as I can. I'm still getting wiped out by this cold that won't let me sleep. I will try to write an explanation of that, however brief, today.

@treeowl
Copy link
Collaborator

treeowl commented Feb 16, 2022

I wrote a little documentation for Curried in #385. It's not great; hopefully someone will be able to flesh it out later.

--
-- Note that, contrary to many other classes in linear-base, we can't define
-- `Traversable T` using deriving via, because the
-- [role](https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/roles.html)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The link for role may be hard to hit on mobile browsers and other touchscreens, since it's so short. How much does that matter?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it matters a little, but not a ton (you can always zoom on mobile). So if you have a good solution, I'll take it. But let's not spend a lot of time on it.

Copy link
Member

@tbagrel1 tbagrel1 left a comment

Choose a reason for hiding this comment

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

Let's just fix these two typos.

@aspiwack aspiwack force-pushed the mini-documentation-on-deriving-generic branch from a85e826 to c77dbfe Compare February 17, 2022 13:13
@aspiwack aspiwack merged commit 390a65e into master Feb 17, 2022
@aspiwack aspiwack deleted the mini-documentation-on-deriving-generic branch February 17, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants