-
Notifications
You must be signed in to change notification settings - Fork 240
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
Inconvenient precedences #2531
Comments
To be clear: I regard this as a bug (a usability bug) that should be fixed, even though it might break some odd code. |
Thanks for the CC on this message, Jacques.
PLFA defines all of these combinators to be at level 0 instead.
If so, that's an oversight. PLFA tries to align with the Standard Library almost everywhere.
Go well, -- P
…________________________________
From: Jacques Carette ***@***.***>
Sent: 20 December 2024 16:41
To: agda/agda-stdlib ***@***.***>
Cc: Philip Wadler ***@***.***>; Mention ***@***.***>
Subject: [agda/agda-stdlib] Inconvenient precedences (Issue #2531)
This email was sent to you by someone outside the University.
You should only click on links or attachments if you are certain that the email is genuine and the content is safe.
As I was setting A3 for my course using PLFA, one of the exercise was:
Prove the following:
⊎-comm : ∀ {A B : Set} → (A ⊎ B) ↔ (B ⊎ A)
where _⊎_ is from Data.Sum.Base and declared infixr 1 _⊎_ and _↔_ is from Function.Bundles and declared infix 3 _↔_. The first is as per README.Design.Fixity but the second doesn't correspond to anything in there.
The problem, of course, is that this leads to needing parens where there really shouldn't be a need for them. The same holds for all the rest of the combinators in Function.Bundles.
Unsurprisingly, PLFA defines all of these combinators to be at level 0 instead.
We should change these. Level 0 seems right. Yes, strictly speaking, this would be a 'breaking' change. Except that I don't think it would break any existing code is current code would have had to put in parentheses (unless they were doing something extremely weird with unions or products of equivalences).
cc: @wenkokke<https://github.com/wenkokke> @wadler<https://github.com/wadler> .
—
Reply to this email directly, view it on GitHub<#2531>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABFJ7MWMLCDSVEI6BDHB4IL2GRCE3AVCNFSM6AAAAABT7O266GVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42TGMBYGY3TSMI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
|
'Obvious' question(s):
|
@wadler : I think PLFA got it right here. (It's not the only place - I've got more issues incoming, when I find the time.)
|
@JacquesCarette I'm very much in sympathy with the spirit of the proposal, but find it isn't easy to find a consistent live once indexing plays a role: the various indexed analogues of |
Those were likely "just done", as there is nothing in our guidelines that would tell you what fixity these should have. More legacy. |
From
So... we did have some sort of guideline in place...the solution would appear to be to add an additional item under
|
Yes, I think adding a case under I definitely see the various kinds of equivalences (defined under |
As I was setting A3 for my course using PLFA, one of the exercise was:
Prove the following:
where
_⊎_
is fromData.Sum.Base
and declaredinfixr 1 _⊎_
and_↔_
is fromFunction.Bundles
and declaredinfix 3 _↔_
. The first is as perREADME.Design.Fixity
but the second doesn't correspond to anything in there.The problem, of course, is that this leads to needing parens where there really shouldn't be a need for them. The same holds for all the rest of the combinators in
Function.Bundles
.Unsurprisingly, PLFA defines all of these combinators to be at level 0 instead.
We should change these. Level 0 seems right. Yes, strictly speaking, this would be a 'breaking' change. Except that I don't think it would break any existing code is current code would have had to put in parentheses (unless they were doing something extremely weird with unions or products of equivalences).
cc: @wenkokke @wadler .
The text was updated successfully, but these errors were encountered: