loopprep

Toy Language Type Inference

total 00:00
Hard48 minPremium Asked at OpenAI

    The type checker for a toy language: build types as trees, print them, infer the return type of a call by binding its generics, and keep it working on types nested twenty thousand deep.

    The five steps
    1. Types as trees 8 min
    2. Bind the generics 9 min
    3. Tuples, nested 10 min
    4. Read them back 10 min
    5. Twenty thousand deep 11 min