Claus Reinke wrote:

>
> what I wanted to write was
> a partial specification, which I would want to write as
>
>   foo :<= C a => a -> b
>
> Read e :<= t as "the type of e should be bounded by t". Choose a better
> symbol if you like -- the idea is to keep the syntax of types unchanged,
> and to introduce a language-level symbol for the existing partial
> ordering of constrained type schemes instead.
>
> Wouldn't this be simpler than introducing new concepts such as type
> "skeletons" or "metaquantifications"?
>

I really like the spirit of Claus' suggestion.  But it isn't as flexible as
the previous ones involving `metaquantifications'.  With these
`metaquantifications', you can construct tighter bounds.  In other words,
Claus' suggestion is roughly equivalent to making all type variables be
`meta' (the right-hand side below doesn't express that the context may have
more elements in it):

    foo :<= C a => a -> b      roughly equiv to     foo :: C _a => _a -> _b

I can easily imagine that you might want some variables to be a bound, and
others to be exact, as in

    foo :: C a => a -> _b

I don't think the above can be expressed with Claus' proposal.

--Jeff

Reply via email to