deriving over renamed types
Thu, 4 Apr 2002 07:07:58 -0800
| > ...which would be very useful, but would probably have unpleasant=20
| > consequences for type inference...
| To my mind, this is not a credible objection. The horse has=20
| already bolted; there's no point in trying to shut the stable=20
| door. The existing post-Hindley-Milner aspects of Haskell's=20
| type system are too useful for type inference to be worthy of=20
| such veneration.
I agree with this. The goal of 100% type inference is a red herring.
This point of view is articulated at some length in a draft paper
Mark Shields and I have written, on scoped type variables
Type inference is still terrifically useful to "fill in the gaps"
programmer-supplied type signatures. The trouble with full type
lambdas is that they make unification essentially impossible,=20
and that has a huge impact on how many type annotations you need.
So I'm completely in agreement with moving towards allowing the
programmer to supply more explicit type information; but I have not
yet seen a proposal that supports anything like full type lambdas
in a system that looks anything like an extension of Haskell,=20
and that does not require quite burdensome type annotations.
But I may well simply be ignorant. =20