Closed JordanMartinez closed 3 years ago
@kl0tl I'd like your suggestions on role annotations for this PR. Perhaps you could submit a PR after this one?
Role annotations are only necessary to relax the nominal roles of foreign data types or to restrict the roles of phantom parameters when they should satisfy some implicit invariant.
There’s no such types here: Forget
and Tagged
have phantom parameters but as far as I know there’s no invariant to preserve by restricting their roles.
I have audited the purescript-contrib org again to confirm but all the types benefiting from more precise roles have pull requests already:
Ok. Thanks for clarifying that. I'll post your comment in the meta issue to track that.
There’s some usages of SProxy
to replace by Proxy
or polymorphic type variables in Data.Lens.Record
and Test.Main
.
Fixed. Thanks for the reminder!
I don't feel strongly about it, but it does feel a little weird to me to have kind-polymorphic definitions for things like Getter
, when they are never used with a kind other than Type
and I don't foresee a use case for them with other kinds. Maybe for individual profunctors like Forget
and Tagged
it would be useful (for instance, Tagged :: Boolean -> Type -> Type
might be useful).
My main concern is that being polymorphic might lead to harder-to-interpret errors in some cases, but I don't know (I haven't tried out kind polymorphism yet).
I just used the suggestion from the compiler to get this in as fast as possible. I'm not familiar with these types' usages. So, if they can only be used with Type, I say we fix them to that kind.
My main concern is that being polymorphic might lead to harder-to-interpret errors in some cases, but I don't know (I haven't tried out kind polymorphism yet).
I've pushed a commit that undoes that. Can I get another review?
Yes, that looks great to me :)
I'll count that as an approval to this PR then.
Backlinking to purescript-contrib/governance#35