Skip to content
프로젝트

소개

현대적인 타입 검사 알고리즘을 귀엽게 구현한 모음입니다.

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Typechecker Zoo

A cute collection of type checker implementations demonstrating modern type checking algorithms from the last fifty years of programming language design.

CI

Algorithm W

Robin Milner's classic Hindley-Milner type inference algorithm from A Theory of Type Polymorphism in Programming.

Type Classes

Haskell-style type classes layered on top of Hindley-Milner, with superclasses, default methods, and dictionary-passing elaboration.

Follows the qualified-types presentation from Mark Jones' Typing Haskell in Haskell.

System F

Second-order lambda calculus with parametric polymorphism using bidirectional type checking.

An implementation of bidirectional algorithm from Complete and Easy Bidirectional Typechecking for Higher-rank Polymorphism.

System F-ω

Complete implementation of System F-ω with higher-kinded types, DK bidirectional type checking, existential type variables, polymorphic constructor applications, pattern matching, and lambda expressions with type inference.

Uses the method of A Mechanical Formalization of Higher-Ranked Polymorphic Type Inference.

Refinement Types

A refinement-typed lambda calculus that discharges obligations to Z3 via Rust FFI bindings.

Inspired by the Liquid Types approach of Rondon, Kawaguchi and Jhala.

Calculus of Constructions

The Calculus of Constructions with a hierarchy of non-cumulative universes, inductive types and universe polymorphism. Limited support for higher-order unification.

Uses a bidirectional dependent typechecker outlined in A universe polymorphic type system by Vladimir Voevodsky.

Row Polymorphism

Koka-style extensible records with scoped labels: duplicate labels are allowed and shadow on selection.

Inspired by the system from Extensible records with scoped labels by Daan Leijen.

Row Effects

Algebraic effects and handlers using the same scoped-label row machinery.

Call-by-Push-Value

A lambda calculus separating values from computations which subsumes both call-by-value and call-by-name. Bidirectional typechecker with two judgment forms.

Basic implementation of Levy's Call-by-Push-Value: A Functional/Imperative Synthesis.

Build

Do the Rust (latest stable) install then:

brew install just # or ( cargo install just )
just build        # Build all projects
just test         # Run all tests

Tutorial

The tutorial is built with mdBook and mdbook-include-rs preprocessor.

just install-docs  # Install mdbook and dependencies
just build-docs    # Build documentation
just serve-docs    # Serve with live reload

Contributing

If you want to contribute, please fork the repository and submit a pull request.

# Clone the repository
git clone https://github.com/sdiehl/typechecker-zoo.git
cd typechecker-zoo/docs

# Install mdBook and the include preprocessor
cargo install --git https://github.com/sdiehl/mdbook-include-rs.git

# Start the mdBook preview
just serve-docs

# Make your edits to markdown files in src/

Then open a pull request on Github. Any contributions are welcome, especially typo fixes and improvements. 🙏

License

MIT Licensed. Copyright 2025-2026 Stephen Diehl.

관련 프로젝트 살펴보기

불러오는 중…