Skip to content

Instantly share code, notes, and snippets.

View FredTheDino's full-sized avatar
🐉
Through the fire and flames

Edvard Thörnros FredTheDino

🐉
Through the fire and flames
View GitHub Profile
@FredTheDino
FredTheDino / typechecker.rs
Last active May 16, 2023 20:45
A simple Hindley Milner typechecker implemented for Lambda Calculus
use std::collections::HashMap;
#[derive(Clone, Debug)]
enum Ast {
Unit,
Var(&'static str), // All strings are uniq
Fun(&'static str, Box<Ast>),
Call(Box<Ast>, Box<Ast>),
}