[Haskell-cafe] closed classes [was: Re: exceptions vs. Either]

MR K P SCHUPKE k.schupke at imperial.ac.uk
Mon Aug 9 13:20:04 EDT 2004

kind statements sound like a good idea - a couple of questions spring to
mind - what is the parameter of a kind statement (a type or a kind... a 
kind makes more sense) ... do we have to stop with kinds what about
"kinds of kinds" - the statement has identical syntax to a data declaration,
is there no way to combine the two, with perhaps a level value?

An example of where you may need kinds-of-kinds (etc) is consider peano numbers
(declared as a kind) ... now consider we have several implementations 
(unary - binary etc) which we wish to group together as an equivalent
to the Num class.

I accept the above is not a good example as this is better served by a class
(as you may well want it 'open')...

It seems from a theoretical point of view easy to add multiple levels of
kinds instead of one level... of course it is probably much more difficault
to do this to GHC?

Of course with kinds of kinds you either have to annotate the statement
with the level - or let the compiler infer the level. The latter seems
much more difficault as the same 'level-less-kind statement' could be
used on multiple levels...


More information about the Haskell-Cafe mailing list