check that type decl unify with inferred types (wip)