Sunday, July 4, 2010

Need Types

I'll need to rethink my types to get everything right, I'll need impredicative typing. I have most in order but didn't implement the higher-rank existential types, yet. There's a delightful paper by Simon Peyton Jones on the subject, Practical type inference for arbitrary-rank types, 2007, although it doesn't have a separate prover (which is actually a pro, discharging constraints to a prover is computation intensive), and doesn't deal with existential types or the mix with all of that and type classes.

There's actually a silly little problem I am wondering about. What's the semantics of a list of type (?t => list t), or rather, list (?t => t). Is it: A, a list of values of an unknown type t, or B: a list of values each of unknown types. I need B, of course.


Meanwhile, I am writing also on the documentation generator which is supposed to be part of the compiler. I got it partly right, then wrong, now right in the last -cough- couple of years.

No comments:

Post a Comment