{"id":31162131,"url":"https://github.com/sdiehl/typechecker-zoo","last_synced_at":"2025-09-19T04:56:50.527Z","repository":{"id":310069856,"uuid":"1038521102","full_name":"sdiehl/typechecker-zoo","owner":"sdiehl","description":"A menagerie of cute implementations of modern typechecking algorithms","archived":false,"fork":false,"pushed_at":"2025-09-09T05:20:46.000Z","size":23713,"stargazers_count":301,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-09T08:20:37.291Z","etag":null,"topics":["compiler","dependent-types","type-inference","type-system","type-theory"],"latest_commit_sha":null,"homepage":"https://sdiehl.github.io/typechecker-zoo/","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdiehl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-15T11:02:13.000Z","updated_at":"2025-09-09T07:47:03.000Z","dependencies_parsed_at":"2025-08-31T11:26:18.643Z","dependency_job_id":null,"html_url":"https://github.com/sdiehl/typechecker-zoo","commit_stats":null,"previous_names":["sdiehl/typechecker-zoo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sdiehl/typechecker-zoo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdiehl%2Ftypechecker-zoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdiehl%2Ftypechecker-zoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdiehl%2Ftypechecker-zoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdiehl%2Ftypechecker-zoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdiehl","download_url":"https://codeload.github.com/sdiehl/typechecker-zoo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdiehl%2Ftypechecker-zoo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275883240,"owners_count":25545490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","dependent-types","type-inference","type-system","type-theory"],"created_at":"2025-09-19T04:56:46.688Z","updated_at":"2025-09-19T04:56:50.519Z","avatar_url":"https://github.com/sdiehl.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Typechecker Zoo\n\nA cute collection of type checker implementations demonstrating modern type checking algorithms from the last fifty years of programming language design.\n\n[![CI](https://github.com/sdiehl/typechecker-zoo/actions/workflows/ci.yml/badge.svg)](https://github.com/sdiehl/typechecker-zoo/actions/workflows/ci.yml)\n\n\u003cdiv align=\"center\"\u003e\n\n| | |\n|:---:|:---:|\n| [\u003cimg src=\"./docs/src/lambda.png\" width=\"128\" height=\"auto\"\u003e\u003cbr/\u003e**Algorithm W**](./algorithm-w/src) | [\u003cimg src=\"./docs/src/ocaml.png\" width=\"128\" height=\"auto\"\u003e\u003cbr/\u003e**System F**](./system-f/src) |\n| [\u003cimg src=\"./docs/src/haskell.png\" width=\"128\" height=\"auto\"\u003e\u003cbr/\u003e**System F-ω**](./system-f-omega/src) | [\u003cimg src=\"./docs/src/lean.png\" width=\"128\" height=\"auto\"\u003e\u003cbr/\u003e**Calculus of Constructions**](./coc/src) |\n\n\u003c/div\u003e\n\n### Algorithm W\n\nRobin Milner's classic Hindley-Milner type inference algorithm from *A Theory of Type Polymorphism in Programming*.\n\n### System F\n\nSecond-order lambda calculus with parametric polymorphism using bidirectional type checking.\n\nAn implementation of bidirectional algorithm from *Complete and Easy Bidirectional Typechecking for Higher-rank Polymorphism*.\n\n### System F-ω\n\nComplete 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.\n\nUses the method of *A Mechanical Formalization of Higher-Ranked Polymorphic Type Inference*.\n\n### Calculus of Constructions\n\nThe Calculus of Constructions with a hierarchy of non-cumulative universes, inductive types and universe polymorphism. Limited support for higher-order unification.\n\nUses a bidirectional dependent typechecker outlined in *A universe polymorphic type system* by Vladimir Voevodsky.\n\n## Build Instructions\n\n### Prerequisites\n\n* [Rust (latest stable)](https://www.rust-lang.org/tools/install)\n* [Just build system](https://just.systems/man/en):\n  - `cargo install just`\n  - `brew install just`\n\n### Commands\n\n```bash\njust build  # Build all projects\njust test   # Run all tests\n```\n\n## Tutorial\n\nThe tutorial is built with `mdBook` and `mdbook-include-rs` preprocessor.\n\n```bash\njust install-docs  # Install mdbook and dependencies\njust build-docs    # Build documentation\njust serve-docs    # Serve with live reload\n```\n\n## Contributing\n\nIf you want to contribute, please fork the repository and submit a pull request.\n\n```shell\n# Clone the repository\ngit clone https://github.com/sdiehl/typechecker-zoo.git\ncd typechecker-zoo/docs\n\n# Install mdBook and the include preprocessor\ncargo install --git https://github.com/sdiehl/mdbook-include-rs.git\n\n# Start the mdBook preview\njust serve-docs\n\n# Make your edits to markdown files in src/\n```\n\nThen open a pull request on Github. Any contributions are welcome, especially\ntypo fixes and improvements. 🙏\n\n## License\n\nMIT Licensed. Copyright 2025 Stephen Diehl.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdiehl%2Ftypechecker-zoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdiehl%2Ftypechecker-zoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdiehl%2Ftypechecker-zoo/lists"}