[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generative record types
> B. Type inference. Why not add a type facility to the record
> proposal?
>
> For example, you could qualify each field with a predicate that the
> corresponding components must satisfy. The mutators generated
> could then check and guarantee no inconsistencies.
I don't think this is likely to work. How would you construct
a predicate for the following type?
forall (a, b) (a * (a -> b)) -> b
This is hardly an esoteric example, since it is the type that
would be inferred for
(lambda (x f) (f x))
Will