- = mapAndUnzipTc tcMonoTypeKind tys `thenTc` \ (arg_kinds, arg_tys) ->
-
- tc_mono_name name `thenNF_Tc` \ (fun_kind, fun_ty) ->
-
- newKindVar `thenNF_Tc` \ result_kind ->
- unifyKind fun_kind (foldr mkTcArrowKind result_kind arg_kinds) `thenTc_`
-
- -- Check for saturated application in the special case of
- -- type synoyms. Here the renamer has kindly attached the
- -- arity to the Name.
- synArityCheck name (length tys) `thenTc_`
+ | isRnLocal name -- Must be a type variable
+ = tcLookupTyVar name `thenNF_Tc` \ (kind,tyvar) ->
+ tcMonoTyApp kind (mkTyVarTy tyvar) tys