Kevin Atkinson wrote:

> Kevin Atkinson wrote:
> >
> > Lennart Augustsson wrote:
> > > Your grammar does not seem to cover
> > > ((*->*) -> *) -> *
> > > which you could get (as the kind of D) e.g. from
> > > data D c = C (c [])
> > >
> >
> > Now how would I use a type considering its constructor has a signature
> > of:
> >
> > C :: a [] -> D a
>
> I answered my own question.
>
> data D c = C (c [])
> data E c = F (c Int)
>
> a = C (F [10])
>
> But what can such a type be used for?

This particular example is not very useful, but there are examples where
higher kinds are used.  Chris Okasaki have some for representing square
matrices.

--

        -- Lennart





Reply via email to