Type-checking multi-methods in ML (A modular approach)
暂无分享,去创建一个
We propose a framework to des ribe type systems with type inferen e for ML-like languages. Our type systems are parameterized by the type algebras from whi h types are drawn. Type soundness is proved on e-and-for-all under minimal assumptions on the type algebra. Observing that ML types form a type algebra, we propose a de idable type system for a language a la ML with type inferen e and polymorphi multi-methods, thus solving a long standing problem. Furthermore, we de ne a sub-language to express lasses ( onstru tors), multi-methods (operators), and their stati and dynami semanti s in a onsistent manner, independently of the base language.