-
Notifications
You must be signed in to change notification settings - Fork 233
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
Irrelevant instance arguments for _<_
#1998
Comments
It's possible to define |
Ah!? ... I think I'd been going from |
I found that working with things that were in terms of For my examples, I suspect that a version using In the end, I refactored absolutely everything to not use |
Hmmmph, yes, I share your frustrations. If we can prove (we do!) that vanilla And so the further I go with #2000 , the more I end up thinking that it can all be reduced to having moved the former definitions in now-deprecated That's (seems to be) a completely defensible position, to me at least (but not, seemingly, to prior authors/maintainers of the library? their insistence on the separation between I might tidy up what I've done, and then not pursue this too much further. The questions there regarding |
As for the 'semantic sense' regarding ... so even my enthusiasm for @Taneb's solution via UPDATED: PR #2000 is now based on |
@JacquesCarette comments welcome on the (at-present) slightly more long-winded definition of But it remains perhaps debatable whether any of this helps at all... |
NB for @JacquesCarette : from my perspective (partial/biased), it is actually (now) easier to understand |
I will dig into this, but after the POPL deadline. I've got tons of paper proofs that need formalized (they are almost all written in detailed equational style as it is, so it is feasible.) |
As commented on the code itself, it looks nice. I have now added an explicit task on my list to re-try my experiments with |
Any update on |
Sorry, not yet. My time slices are still thin... |
I'm (now) less committed to working towards getting #2000 in sufficient shape for merging into v2.0, but I'm definitely still interested in this issue, for basically two reasons:
|
So... before (thinking about) closing this issue, which has led to a lot of subsequent re-thinking of things, on my part at least, I'm left with a open design/implementation question: where the library as it stands (eg
as a precondition on functions (either as an implicit argument, or better, as an irrelevant instance to resolve by search), can/should we instead simplify to the computationally more efficient
NB this is distinct from cases such as (... considering lifting this out as a fresh issue/nudge towards a possible PR. ) |
On the latest design question: I have no current opinions. I have not looked around that part of the design space at all. [Sometimes a null answer is better than the feeling of speaking into the void.] |
Well in fact, besides |
So: (DRAFT)
Data.Nat._≤_
be declared asinstance
s? #1951Positive/Negative/etc.
to use irrelevant instance arguments #1581 RFC: changed_/_
and_%_
to use irrelevant instance arguments #1538 etc.lead me to conclude that we should add (!?) an irrelevant-instance version of
LessThan
toData.Nat.Base
, along the analogy withNonZero
, and forever after use this relation for 'computational' appeals to_<_
, such as in the (old/refactored; mea culpa) definition offromN<
...... the only question being whether this can already be achieved by back-porting
Positive
etc. toData.Nat
, as any instance ofLessThan m n
(sic) defined in terms of_<ᵇ_
would eventually reduce to one ofPositive k
for somek
? or else definingPositive
in terms ofLessThan
?The text was updated successfully, but these errors were encountered: