[WIP - don't merge] Implement the typer

Nitpick: You could move the decl into the constructor, like this: `final case class ThisLiteral(var decl: Decl = null) extends Literal` ... not sure if it makes sense from a consistency POV though.