-
Notifications
You must be signed in to change notification settings - Fork 236
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
[DRY] defining concrete instances of RawX
bundles
#2255
Comments
Hmm this is mainly a legacy of not wanting to structure the non-Raw bundles like this. There's no particular reason why they couldn't be structured like this.
They are all redundant. |
I would sure welcome such a rewrite. We should "use the structure of the math" more. And I guess the first 2 renames are not needed at all? |
@JacquesCarette , you wrote:
See the (revised) deployment of the proposed pattern in https://github.com/jamesmckinna/agda-stdlib/blob/modular-arithmetic/src/Data/Integer/Modulo.agda Refactoring |
Can you please write out the pattern? I don't know what parts of that file is "the pattern" and what is just code. |
OK, but as a placeholder for now, what I envisage as "the pattern" is to replace a succession of individual |
RawX
bundlesRawX
bundles
(Some while ago... @MatthewDaggitt wrote)
Revisiting this in the light of my just-posted #2391 , and having dealt with the complexities of the re-export strategies in |
Re: documenting "the pattern" @JacquesCarette |
This is an offshoot of thinking about both #2252 and #1688 / #2254 (and perhaps requires precise resolution of the latter):
why, in eg.
Data.Nat.Base
, do we writewhen it might be simpler/better/DRY to write instead:
Also (incidental historical glitch?): why do the first four bundles not need to specify the
Carrier
, while the last two do? Or are they all, in fact, redundant?UPDATED (following @MatthewDaggitt 's and @JacquesCarette 's comments below):
The text was updated successfully, but these errors were encountered: