basic typechecking code compiles with many undefined pieces