[EMAIL PROTECTED] writes:
> > > data F = MkF t -> t -- did I get the syntax right?
> > Almost
> > data F = MkF (t -> t)
> > >
> > > foo :: (Int, String, F) -> (Int, String)
> > > foo (i, s, MkF f) = (f i, f s)
> >
> > In fact, this extension has been implemented in Hugs
> > and ghc as well as I understand it, but neither of these
> > implementations have been made publically available.
>
> I imagine that this conflicts somewhat with Laufer and Odersky's
> proposal to assume that free type variables in data declarations
> should be *existentially* quantified, leading to first-class
> abstract types.
Indeed. I would have prefered to keep free type variables
existentially in data declarations. But I could find no nice way
to have both universal and existential type variables so I let
Mark Jones persuade me into this syntax.
Existential tyvars are written with a ?, e.g.
data Ex = Ex ?a (?a -> Int)
Not pretty, but it's only an experimental feature anyway.
-- Lennart