# tomprimozic/type-systems

Implementations of various type systems in OCaml.

Repository: https://github.com/tomprimozic/type-systems
Canonical: https://ross.abutalabs.com/products/type-systems
Language: OCaml
License: Unlicense
License Family: permissive
Last push: 2015-08-31T06:47:52+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4599, "days_push": 4020, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1603, forks 75 (observed 2026-08-28T04:05:09.849744+00:00)

## What it is
A collection of minimal, well-commented OCaml implementations of various advanced type systems, including Algorithm W, extensible rows, first-class polymorphism, gradual typing, and refined types. It is designed as an educational resource for learning about type inference and experimenting with type system design.

## Use cases
- learn how Hindley-Milner type inference works
- study implementations of Algorithm W in OCaml
- understand extensible records with scoped labels
- explore type inference for higher-rank polymorphism
- see how gradual typing can be implemented
- experiment with extending a type system
- prepare for programming languages coursework or research

## When to choose
- you want clear, minimal reference implementations of type inference algorithms
- you are learning programming language theory and want runnable code
- you want a starting point to build or extend your own type system
- you need to understand papers like Leijen's extensible rows or HMF concretely

## When to avoid
- you need a production-ready type checker or compiler
- you want a maintained library with API stability and releases
- you need type system implementations in a language other than OCaml
- you want comprehensive documentation or tutorials beyond the code

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: type-system, interpreter, programming-language
- domain: programming-languages, education, tutorials
- platform: cross-platform
- tags: ocaml, type-inference, hindley-milner, algorithm-w, gradual-typing, extensible-records, polymorphism, dependent-types, academic, type-systems, algorithms

## Member repositories
- tomprimozic/type-systems (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.849744+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:52:32.855349+00:00, confidence not recorded.
  - readme: https://github.com/tomprimozic/type-systems (fetched 2026-08-28T04:05:09.849744+00:00, sha 4e8ee2242caa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
