简体   繁体   中英

Is there any use for kinds of kinds?

In Haskell, kinds (types of types) allow for some useful things such as type constructors. My question is, would there be any benefit at all to also having kinds of kinds (types of types of types), or is there nothing they could do that couldn't easily be done with just kinds and types?

Ωmega has sorts all the way up. Basically, it is claimed that an infinite kind hierarchy together with appropriate GADTs is as powerful as dependent types.

Also, when trying out stuff using DataKinds , PolyKinds and the like, I sometimes feel constrained somewhat by how type constructors are not lifted to kind constructors, or that lifted kinds cannot be constrained (ie, there are no kind classes ). Ωmega seems to solve a lot of these restrictions -- unfortunately, as it is often the case, at the cost of becoming a more academic language. But I still find it easier to read compared to "real" dependently typed languages like Agda and Coq (although at least Agda does have an infinite hierarchy of sorts, too). Maybe that's because Ωmega just fits more to a Haskell mindset.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM