🧠 Type Inference Playground

Explore Algorithm W (Hindley-Milner) type inference step by step

📝 Ruchy Expression

💡 Algorithm W Overview

1. Generate Constraints: Create type equations from syntax

2. Unify: Solve constraints by finding substitutions

3. Generalize: Abstract type variables to create polymorphic types

4. Instantiate: Create fresh type variables for polymorphic uses

🔧 Inference Steps

Enter an expression and click "Infer Types" to see the step-by-step process...