What are uses of polymorphic kinds?

前端 未结 3 753
走了就别回头了
走了就别回头了 2021-02-13 00:06

Polymorphic kinds are an extension to Haskell\'s type system, supported by UHC, allowing

data A x y = A (y x)

to be typed (kinded?) as a

3条回答
  •  难免孤独
    2021-02-13 00:08

    Adding Polymorphic Kinds to GHC

    The background to this question would be the motivation in general for a more expressive kind system.

    That is, the overall reason to add polymorphic kinds to Haskell is to improve the experience of type level programming. Currently type level programming in Haskell proceeds in a essentially untyped "kind" level. A richer kind language will make type level programming in Haskell, in general, easier.

    A more concrete example would be to remove the (dynamic) Typeable constraint from generics of the SYB style (citation), as well as improving overall support for higher-kinded generic programming..

提交回复
热议问题