Sketching the typing rules of expressions