-
Notifications
You must be signed in to change notification settings - Fork 710
Named and nameless types #5258
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
Comments
The idea sounds sensible to me. |
Relatedly, I'd like to parse with |
@Ericson2314 what's status with this. Is this post-3.0 now? |
@phadej Yeah I haven't started on it. Should I try to bang it out quick? :D |
Probably no |
That's what I figured. My only concern for this and a few other things is what the situation wrt breaking changes will be after 3. |
We can have breaking changes in the next major release (3.2). |
OK great! |
Uh oh!
There was an error while loading. Please reload this page.
We have a general principle in software engineering that things shouldn't know their own names. In the the DB case, that means talking about rows without their "surrogate key" with trick's like Persistent's
Entity
.I think we could benefit from something similar in Cabal. Take for example, components, under the assumption I've finally finished my #5100 separating GDP from PD :D. We replace
with
(or some strictly fancier trick) and so on.
A GDP could have quite invalid structure, so it should stay the same using
NamedLibrary
whereLibrary
used before, but a PD should ensure that names are not reassigned to components and instead have aMap UnqualComponent Library
with a convenience forNamedLibrary
.This and similar tricks would allow us to enforce a bunch of invariants that are already made true in transformations like GDP -> PD but then only assumed with partial code rather than enforced.
CC @phadej
The text was updated successfully, but these errors were encountered: