4 ms·
Kinds in Haskell seem to be evolving in the direction of controlling the representation of datatypes in memory. * (also called Type) is the kind of types whose
by danidiaz 6y ago
Kinds in Haskell seem to be evolving in the direction of controlling the representation of datatypes in memory. * (also called Type) is the kind of types whose values are "lifted": they can be lazy computations which might cause an infinite loop, throw an exception, and so on.
There are also kinds for types whose values are "unlifted", meaning they really correspond to actual values in memory, not lazy thunks.
Right now the language for expressing unlifted datatypes is quite limited. Hopefully it will be expanded so that we can write "strict Haskell" more easily.
"Levity polymorphism" paper https://www.microsoft.com/en-us/research/wp-content/uploads/2016/11/levity-pldi17.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/...
"Kinds are calling conventions" paper https://www.microsoft.com/en-us/research/uploads/prod/2019/03/eta.pdf https://www.microsoft.com/en-us/research/uploads/prod/2019/0...
The -XUnliftedNewtypes extension https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html?highlight=unlifted%20newtypes#extension-UnliftedNewtypes https://downloads.haskell.org/ghc/latest/docs/html/users_gui...
https://stackoverflow.com/questions/35318562/what-is-levity-polymorphism https://stackoverflow.com/questions/35318562/what-is-levity-...
https://stackoverflow.com/questions/56311510/what-does-type-signature-for-undefined-mean-in-haskell/56317845#56317845 https://stackoverflow.com/questions/56311510/what-does-type-...