typecheck.py - more debugging