[WIP - don't merge] Implement the typer

Not a tail call?