[ghc-steering-committee] #547: Remove kind constraints, Recommendation: accept
Arnaud Spiwack
arnaud.spiwack at tweag.io
Mon Nov 14 10:28:55 UTC 2022
Dear all,
Our own Richard and Simon PJ are proposing to remove kind constraints from
GHC https://github.com/ghc-proposals/ghc-proposals/pull/547
What are they? Well, exactly. It is a little known feature that you can add
constraints in kinds. Actually, you can only have equality constraints
(e.g. a~Boo => t -> Type (I actually wanted to write Bool, but I decided to
keep the typo in honour of the season)), class constraints are already
forbidden.
The feature is of limited use because you are not allowed to actually use
the constraint when writing instances of such a kind. It's purely a
restriction (much like data type contexts). Richard describes the feature
as having been implemented because it was easy, not because it was
answering a particular need (though it is possible to find applications).
Richard and Simon have a problem with this not-very-useful feature: its
mere existence makes their plan to properly separate Constraints and Types
in Core much harder. So they want to just get rid of it.
Now, it's difficult to estimate how much this feature is actually used. As
we've learnt the hard way with the simplified subsumption proposal. I'd
honestly be surprised if there was actually no usage of kind constraints in
the wild. So there is always a risk. But I think that this is a fairly safe
bet that very few people have actually used this feature. On the other hand
the Constraint/Type separation is long overdue. It seems to me that
removing the feature is the right call. I recommend acceptance.
/Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20221114/af130748/attachment.html>
More information about the ghc-steering-committee
mailing list