fix parsing of provide-tpyes, and start fixing type errors in the compiler