Specifying Kinds of Types

Daan Leijen daan@cs.uu.nl
Fri, 8 Feb 2002 13:21:29 +0100

>I'd like to be able to declare the kinds of new types and synonyms, 
>because sometimes Haskell can't infer them.

The kind inferencer normally works quite well
in Haskell. Only when you use phantom types
(ie. unused type variables), you sometimes have to 
guide the kind inferencer -- either with phantom
constructors (ie. unused constructors) or phantom
type defintions in the case of newtypes.

Allthough not described, we used this trick extensively 
in Haskell/DB in order to force phantom types 
into the T-REX kind "Row". (http://www.cs.uu.nl/~daan/papers/dsec.ps)

All the best,