-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add alternative Fin operators for Fin with non-zero size #1847
Conversation
Hmmm. Starting to reconsider the wisdom of all this. It's doable in the style I've advocated, but wondering whether @MatthewDaggitt 's instincts towards deprecating the original functions/properties might be the right track after all. More thinking/investigation needed. The surprising thing is how little used is any of the functionality in |
I now slightly regret deleting branch |
Hi @jamesmckinna, thanks for this and apologies for not keeping up with my replies! What's your current plan? From my perspective, I think you've convinced me that its significantly more subtle than I first thought when I thoughtlessly opened the issue. I'm happy to drop this from the v2.0 milestone if you think some more time for rumination would be useful? |
As ever, at least two options, no, three:
The main issue (for me; not necessarily for the maintainers/the originator of the proposal) is that by pursuing the, I think correct, worker/wrapper factorisation, the code has 'obviously, but trivially' blown up a bit (and I'm not sure if I've even capture every last possible call-site where a I think perhaps let's try to get the PR into a state where it can be merged+closed, and then see how much use the 'new' functionality actually gets. But as you know, I've let other, useful but more 'trivial' PRs get in the way in the meantime... scatter-gun mentality, sorry! Where there are potential sources of (fruitful?) exploitation might be in the |
@MatthewDaggitt I've just gone over my own 'thinking' on the topic, and the 13 files touched by this PR. I've added two more functions to I'm going to stop there:
So if you find me pushing anything further to this branch without an explicit maintainer request, please shoot me ;-) But please DO merge this if it still makes sense to you to do so; I think on balance that it might be worthwhile, because it would enable you (or anyone else) to actually do the experiments/engage in more subtle thinking about the problem. Hopefully this is the/a 'good'/'locally best' middle way! |
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.
Monumental effort here. Real comments incoming on the issue.
Thanks @JacquesCarette . Suggest that we still merge this, and then row back on that later on, or should we in fact abandon? I'd rather the former than the latter, but I'm wondering if the effort was, monumental or otherwise, a Quixotic enterprise. |
Definitely should merge. Can't let perfection be the enemy of the good. |
Okay, so I really like these additions but I think they make Having been mulling it over, how about we move all the new definitions to a separate module underneath |
@MatthewDaggitt , thanks for getting back to this one. |
... Given that 13 files are touched by this PR, are you (also; further) proposing that a |
Also, I don't want to screw up the commits. What should I do (or do not) about merging in the updates to |
Re: backwards-compatible slot-ins. But perhaps I should say: I don't think it can be done, although the very simplest examples of |
Looking at this PR, it might be easier to abandon it and instead redo it "from scratch" using the naming convention that @MatthewDaggitt suggests. It would become a matter of cut-and-paste from this one into new files. Extremely tedious, but not so difficult. The various (I've just spent 1.5 days refactoring some code where I'm co-author, a lot of it involving splitting things off into smaller files. The call graph is now close to explainable! I do listen to my own advice...) |
Quick naming question before proceeding any further: what do you either if you think should be the names of homogeneous zero and successor? It strikes me that these will always need to coexist with the inhomogeneous constructor versions... the worm, as it were, is already in the apple. Even before anything else were to be added (wherever). |
I've lost track: what's a homogeneous zero? an inhomogeneous zero? |
@JacquesCarette if you look in the revised Homogeneous They get used at various points (maybe they could be avoided altogether by some other trickery?) to ensure type correctness of various downstream definitions/properties. In a sense, for me, they are paradigmatic of (the essence) of Matthew's proposal. But I don't see these two special cases as available as slot-in replacements for the real constructors (or can they? not sure! I've perhaps spent/wasted too much time already thinking about this issue/PR to have a satisfactory solution), so already the question comes: what should they be called? |
Actually, after sleeping (though not well) on this, I now realise my thinking has been changing over the course of yesterday's discussion, especially since the suggestion to do this PR over for a third iteration (first with Maybe the New Year (and the one-year anniversary of the original issue) might bring new energy, but I suspect not. @MatthewDaggitt has already indicated that the solution offered to the original issue is not really what he had had in mind, nor what he might have hoped would work. Comments here and on issue #1686 are perhaps a clue that some fresh thinking is required (quite possibly in the form of a direct attack on So if someone else has the ... patience? stubbornness?... to pursue this, I'd be happy for them to cherry pick from this branch, along the lines @JacquesCarette proposes. |
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 should revert this commit, and recommit as a separate PR
This reverts commit 7f3dd41.
I might have the patience / stubbornness to do this. But I would need to really understand the problem that needs to be solved. First, I think I need to read up on what the original problem was. I'll want to think about it to evaluate the various solutions for myself, afresh. Perhaps a new issue (#1686 seems to be more about the solution than the problem it solves) would help with that? BTW, I would be very happy if the solution turns out to be what is referred to as the third iteration above. I just don't want to presupposed that. |
Go for it! Happy to share anything I might have which isn't already encoded in the branch, or the various trails of issue comments/reviews etc. As for the discussion under #1686, this may indeed focus too much on the solution(s) I originally developed/espoused (rather than leaving that discussion under the various PRs)... apologies for more GitHub blundering on my part. But the top of the issue thread has a fairly crisp summary of Matthew's position: the 'problem' lies at the meeting of constructor-form specification/presentation of (the types of) library functions, and their subsequent deployment at call-sites where the ( As you yourself observed in that discussion, the problem is potentially pervasive (and subtle!) in DTFP, and the general setting ('type-checking modulo') might bring in a raft of possible technologies ( For the original applications to |
Suggest we also remove this PR from the v2.0 milestone. |
The proposed choice of names, involving primes, required one renaming of existing code, and propagation of that new name. But such a change is not a deprecation... so how does one account for this in the CHANGELOG?
Also: I did not yet re-add the various operations and properties of various subtractions originally defined in
Data.Fin.Base
in PR #1830... suspect that they are really no longer necessary.REVISED: the following would make use of
_ℕ-suc_
were it to be definedData.Graph.Acyclic
extensivelyData.Fin.Properties
, to show it does the right thingData.List.Properties
fordownFrom