# Bidirectional Typing

**Authors:** Jana Dunfield, Neel Krishnaswami

arXiv: 1908.05839 · 2022-03-21

## TL;DR

Bidirectional typing combines type checking and synthesis to support undecidable inference, reduce annotation burden, and improve error localization, offering a flexible approach for type systems.

## Contribution

This paper surveys the development and principles of bidirectional typing, highlighting its advantages and guiding future research directions.

## Key findings

- Supports features with undecidable inference
- Reduces annotation burden in typed languages
- Improves error localization

## Abstract

Bidirectional typing combines two modes of typing: type checking, which checks that a program satisfies a known type, and type synthesis, which determines a type from the program. Using checking enables bidirectional typing to support features for which inference is undecidable; using synthesis enables bidirectional typing to avoid the large annotation burden of explicitly typed languages. In addition, bidirectional typing improves error locality. We highlight the design principles that underlie bidirectional type systems, survey the development of bidirectional typing from the prehistoric period before Pierce and Turner's local type inference to the present day, and provide guidance for future investigations.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1908.05839/full.md

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/1908.05839/full.md

## References

81 references — full list in the complete paper: https://tomesphere.com/paper/1908.05839/full.md

---
Source: https://tomesphere.com/paper/1908.05839