Prototype typechecker and elaborator for Backpack.