# User:Zzo38/Proposal for additional kinds

### From HaskellWiki

< User:Zzo38(Difference between revisions)

Line 3: | Line 3: | ||

==New kinds== | ==New kinds== | ||

## -- New name for (#) kind (although (#) is available for compatibility) | ## -- New name for (#) kind (although (#) is available for compatibility) | ||

− | + | & -- Kind for classes | |

+ -- Kind for type-level natural numbers | + -- Kind for type-level natural numbers | ||

$ -- Means make up a kind from a Template Haskell code | $ -- Means make up a kind from a Template Haskell code | ||

Line 9: | Line 9: | ||

==Kind of classes== | ==Kind of classes== | ||

Example: | Example: | ||

− | + | * -> & -- Kind of Eq class. | |

− | + | (* -> *) -> & -- Kind of Monad class. | |

− | * -> | + | (* -> &) -> & -- Class of classes. |

− | + | + -> * -> & -- Infinite series of classes, selected by a natural number. | |

− | + -> | + | |

− | + | ||

− | + | ||

==Natural number kind== | ==Natural number kind== |

## Revision as of 01:48, 5 September 2011

This document is proposal about additional kinds.

## 1 New kinds

## -- New name for (#) kind (although (#) is available for compatibility) & -- Kind for classes + -- Kind for type-level natural numbers $ -- Means make up a kind from a Template Haskell code

## 2 Kind of classes

Example:

* -> & -- Kind of Eq class. (* -> *) -> & -- Kind of Monad class. (* -> &) -> & -- Class of classes. + -> * -> & -- Infinite series of classes, selected by a natural number.

## 3 Natural number kind

If a type requires a parameter, it can be a `+` kind, meaning numbers.

There should be some way to specify a type taking natural numbers by defining it for zero and them for a successor, so that it applies for all natural numbers.

It also means a type of kind `+ -> + -> +` can be a type of adding numbers or other stuff like that, too.