first steps on typechecking annotations for #629