less patching, more type checking

this version does not need to patch up symbol infos or trees,
at the expense of creating symbols ourselves and type checking
in two phases