-tcMonoTypeKind (MonoTyApp name tys)
- = mapAndUnzipTc tcMonoTypeKind tys `thenTc` \ (arg_kinds, arg_tys) ->
-
- tc_mono_name name `thenNF_Tc` \ (fun_kind, maybe_arity, 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.
- (case maybe_arity of
- Just arity | arity /= n_args -> failTc (err arity)
- other -> returnTc ()
- ) `thenTc_`
-
- returnTc (result_kind, foldl mkAppTy fun_ty arg_tys)
- where
- err arity = arityErr "Type synonym constructor" name arity n_args
- n_args = length tys
+tcMonoTypeKind (MonoTyApp name@(Short _ _) tys)
+ = -- Must be a type variable
+ tcLookupTyVar name `thenNF_Tc` \ (kind,tyvar) ->
+ tcMonoTyApp kind (mkTyVarTy tyvar) tys