-
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
[ refactor ] Function.Definitions
and Function.Consequences
?
#2565
Comments
This is exactly the structure we used to have but it didn't work because of the way that Agda handles transitive top-level parameters. Therefore we switched to the current design in a breaking change. Let me try and dig up the issue. |
See There's also an upstream issue on the Agda repo describing the underlying problem with top-level module parameters where if I remember correctly there was some debate about whether the current behaviour that caused this is a bug or a feature. However, I can't seem to find it.... |
Wow!? So I think that the 'problem' (IIUC, the failure to 'strengthen' a definition to only mention those module parameters actually used) is solved by the separation I propose (namely that the non- |
So if I understand it correctly your proposal is go back to the old design, but fix the problem by not having the auxiliary modules re-exported by the top level |
I'll post the PR #2567 ... hmm there's more to this than meets the eye, including some existing opportunities for [DRY] refactoring. |
Additionally: the unsolved metas mentioned in #2566 largely seem to originate from
These would each be
|
Against #2514 , and continuing to think about #1436 etc., cf. #2318
I think that it might be more ergonomic to refactor
Function.Definitions
to separate out:Definitions
parametrised on two equality relations, which would now become top-level module parametersStrictly*
definitions, parametrised on a single equality relation, which I would move to a distinct newFunction.Definitions.Strict
module, again parametrised on the relation (and indeed, the relative importance of these definitions relative to the others has been discussed at length; it feels as though they are 'special', and not for 'everyday' use, except for thePropositional
instantiation with_≡_
inData.Nat.Properties
etc.)Function.Consequences
andAlgebra.Definitions
, where in particular, one can immediately instantiate the two relations with the underlying equality of theAlgebra
(this would be the ergonomic payoff): eg. rephrasing theCancellative
properties in terms ofInjective
etc. cf. RefactorAlgebra.Consequences.*
? #2502Draft PR in preparation.
Potentially
breaking
, so probably v3.0, but in terms of the overall structure/design ofstdlib
, I think the shift in parameterisation would be 'harmless', although it might go against the grain of the existing import/dependency structure ofFunction
?The text was updated successfully, but these errors were encountered: