Subtyping

Steffen Mazanek steffen.mazanek@unibw-muenchen.de
25 Apr 2003 19:38:58 +0200


Hello.

Yet another question:
Consider a type structure like in "Typing Haskell in Haskell" where
types are curried, e.g.

data Type = TAp Type Type | TCon Id Kind | TVar Id Kind

This means, "(->) Int" is a valid type. In a subtype calculus
you can say, that "a->b" is a subtype of "c->d" if "b" is a subtype
of "d" and "c" is a subtype of "a", because "->" is contravariant
in its first and covariant in its second argument.
So far so good, how can be dealt with subtyping and "partial" types?
E.g. is it acceptable to say that "(->) a" is a subtype of "(->) b"
if "b" is a subtype of "a"?
Any ideas? Or can someone point me to an online-resource which 
addresses this topic?

Thanks in advance,
Steffen

-- 
Haskell: 
that's where I just curry until fail, unwords any error,
drop all undefined, maybe break, otherwise in
sequence span isControl and take max $, id: (d:[])