-
Notifications
You must be signed in to change notification settings - Fork 16
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
dup
and arr2
#308
Comments
Looks like you proposed adding EDIT: Why |
https://hackage.haskell.org/package/extra-1.8/docs/Data-Tuple-Extra.html has |
On Sat, 23 Nov 2024, Oleg Grenrus wrote:
https://hackage.haskell.org/package/extra-1.8/docs/Data-Tuple-Extra.html has dupe :: a -> (a, a).
|
I don't see any conclusion in that thread. |
I don't think this passes the Fairbairn threshold for |
Why? It appears these are duplicated across many libraries, have been used for years and are primitives. Many functions in base are not very "exciting" |
For one thing, There is nothing blocking |
I don't think that's a blocker. |
Sorry, it's been 6 years and I'd completely forgotten about that thread. Here's a summary of the discussion back then, together with my comments. Name
See also comments below regarding location. Signature / implementationThere are several possible implementations of duplicating transformations:
The nice thing about the first one is that it works for all arrows, not just functions. We can still use it with functions, but we no longer need to LocationObviously this would be partly dependent on the signature. If it works on arrows, then it makes sense to add it to
I'm not sure how uncommon it is. Here's a search: https://github.com/search?q=ghc.io.device+dup+language%3AHaskell&type=code. I don't know how to search among all packages on hackage. Note that If both EDIT (fix attributions for quotes). |
You've mixed up the attributions for the quotes. @mixphix is the one who said the name clash might be a problem; I'm the one who pointed out that it's not a common import. |
@treeowl My bad. Sorry about that. Fixed in the original comment. |
Gentle nudge. |
https://hackage-search.serokell.io/?q=%5Cbdup%5Cb
|
I think it's quite common for functions that operate on larger tuples to have a number indicating the arity. For example, in https://hackage.haskell.org/package/raft-0.3.7.2/docs/Data-Tuple-Util.html we have |
What are the next steps? |
@ivanperez-keera please refer to https://github.com/haskell/core-libraries-committee/blob/main/PROPOSALS.md#the-how It's up to proposer to decide on exact content of the proposal and prepare impact assessment. If I may suggest, given that the proposal touches frequently imported modules, you likely need a draft implementation first, because otherwise it would be impossible to prepare impact assessment. Dear CLC members, any non-binding opinions on |
They seem fine to me and I can see how they help people who use arrows. I agree that |
These seem like useful arrow-related functions, I think exporting them from |
I'm for an export from |
Hi,
Two functions from one of Yampa's auxiliary modules have become generally useful (they were made public and they have found use in games, other applications, and other libraries):
Would you consider adding them to
base
?I'd say the logical place for
dup
would beData.Tuple
and forarr2
would beControl.Arrow
.The text was updated successfully, but these errors were encountered: