Bidirectional polymorphism through greed and unions

نویسنده

  • Joshua Dunfield
چکیده

Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting, even in the presence of subtyping. The first contribution is a bidirectional type system that supports first-class (higher-rank and impredicative) polymorphism but is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). This power comes from bidirectionality combined with a “greedy” method of finding polymorphic instances inspired by Cardelli’s early work on System F<:. The second contribution adds subtyping; combining bidirectional typechecking with intersection and union types fortuitously yields a simple but rather powerful system. Finally, I present a more powerful algorithm that forms intersections and unions automatically. This paper demonstrates that bidirectionality is a strong foundation for traditionally vexing features like first-class polymorphism and subtyping.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Trade :union:s, trade :union: movement, trade :union:s, political sphere of Iran

The research, which is written using the approach of historical sociology and descriptive and analytical methods, examines the interactions of trade unions after the Islamic Revolution. The examinations show that the first trade unions or trade unions emerged in England in the early eighteenth century. In Iran, too, the tendency towards trade unions is related to the years before the Constituti...

متن کامل

Greed and Fear in Network Reciprocity: Implications for Cooperation among Organizations

Extensive interdisciplinary literatures have built on the seminal spatial dilemmas model, which depicts the evolution of cooperation on regular lattices, with strategies propagating locally by relative fitness. In this model agents may cooperate with neighbors, paying an individual cost to enhance their collective welfare, or they may exploit cooperative neighbors and diminish collective welfar...

متن کامل

A New Topology of Bidirectional Buck-Boost dc/dc Converter with Capability of Soft Switching and input Current Ripple Cancellation

In this paper, a new bidirectional buck-boost dc-dc converter with capability of soft switching and zero input current ripple is proposed. The coupled inductor is used in the proposed converter to eliminate the input current ripple. In the proposed converter, zero voltage switching (ZVS) and zero current switching (ZCS) can be obtained for the main and auxiliary switches, respectively. In addit...

متن کامل

Genetic variability of the activity of bidirectional promoters: a pilot study in bovine muscle

Bidirectional promoters are regulatory regions co-regulating the expression of two neighbouring genes organized in a head-to-head orientation. In recent years, these regulatory regions have been studied in many organisms; however, no investigation to date has been done to analyse the genetic variation of the activity of this type of promoter regions. In our study, we conducted an investigation ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008