-
Notifications
You must be signed in to change notification settings - Fork 247
Mess around with IsSemiringWithoutOne reexports #2499
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
Conversation
It was missing several and had some duplicated, which was causing problems when trying to use those names I don't know how to changelog this
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.
Also need a Changelog entry.
; isMonoid to +-isMonoid | ||
; isCommutativeMagma to +-isCommutativeMagma | ||
; isCommutativeSemigroup to +-isCommutativeSemigroup | ||
) | ||
|
||
open Setoid setoid public | ||
open IsEquivalence isEquivalence public |
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.
Doesn't this removal of open Setoid setoid public
change the export, i.e. Carrier
is no longer visible?
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.
Yes, this is intentional - no other structure exposes Carrier
, and doing so was causing issues when trying to use the corresponding bundle.
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.
[UPDATED} Indeed, no (other) Only Structure
IsSuccessorSet
and IsMagma
export setoid
, but I think, on balance, that they should not. Suggest a downstream PR to look at this more closely, unless @Taneb you want to investigate this further as part of this PR?
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.
Re: the export of setoid
from IsMagma
: this is used by IsGroup
in this module, so can't be removed at this stage.
I would document this as a bug fix. Noting the removal of the |
As the author of the prior, now offending, commit, I drew attention in the discussion comments on the relevant PR to the possibility of having introduced such a bug... ... having said that, the
There's a meta-issue here:
This is not to throw shade either on me (for a buggy commit), or @Taneb for the fix here, but to point out that, wittingly or unwittingly, reverting prior commits may have further subsequent negative downstream consequences. Happy to be corrected if I've misconstrued the situation here! |
Allow me to correct myself, after yesterday's splurge/rant, for which I apologise. I did some more digging through the history, and the various Summary:
Hope this helps! Apologies for interruptions in the smooth running of things... |
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.
Suggest removing the export of setoid
completely... but not (yet) sure what the knock-on consequences of that might be...
@@ -415,15 +415,22 @@ record IsSemiringWithoutOne (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where | |||
zero : Zero 0# * | |||
|
|||
open IsCommutativeMonoid +-isCommutativeMonoid public | |||
using (setoid) | |||
using (setoid; isEquivalence) |
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'd double down on @Taneb 's suggestions, and remove the setoid
export entirely. As noted in my longer meta-comment, I think it's a design error for a Structure
to export a sub-Bundle
... one to chalk up to my relative inexperience/lack of understanding when raising and then tackling #1917 which caused all this in the first place. hey-ho!
; isMonoid to +-isMonoid | ||
; isCommutativeMagma to +-isCommutativeMagma | ||
; isCommutativeSemigroup to +-isCommutativeSemigroup | ||
) | ||
|
||
open Setoid setoid public | ||
open IsEquivalence isEquivalence public |
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.
[UPDATED} Indeed, no (other) Only Structure
IsSuccessorSet
and IsMagma
export setoid
, but I think, on balance, that they should not. Suggest a downstream PR to look at this more closely, unless @Taneb you want to investigate this further as part of this PR?
Ugh. Worse that I thought: the Nevertheless, I think deleting the |
Gah these algebra imports, re-exports are always nightmarish. I'm not across the exact details, but my understanding aligns with both @jamesmckinna and @Taneb in that we try to avoid structures exporting bundles. |
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.
My suggestions could be considered downstream, but I think are worth doing here as immediate consequences of the new exports you propose?
distribˡ : * DistributesOverˡ + | ||
distribˡ = proj₁ distrib | ||
|
||
distribʳ : * DistributesOverʳ + | ||
distribʳ = proj₂ distrib | ||
|
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.
These additions make sense, but if you are going to make them, then perhaps you should re-export them downstream from eg IsRingWithoutOne
via opening an isSemiringWithoutOne
manifest field... etc. which might simplify those exports elsewhere, too?
@Taneb do you want me to add a |
Lots of other merges happening right now... so |
@JacquesCarette I think you can now approve the changes and merge? |
It was missing several and had some duplicated, which was causing problems when trying to use those names
I don't know how to changelog this