applyTysX :: [TyVar] -> Type -> [Type] -> Type
-- applyTyxX beta-reduces (/\tvs. body_ty) arg_tys
applyTysX tvs body_ty arg_tys
  = ASSERT2( length arg_tys >= n_tvs, ppr tvs $$ ppr body_ty $$ ppr arg_tys )
    mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)
             (drop n_tvs arg_tys)
  where
    n_tvs = length tvs

{-
************************************************************************
*                                                                      *
                         Pred
*                                                                      *
************************************************************************

Predicates on PredType
-}
applyTysX :: [TyVar] -> Type -> [Type] -> Type
applyTysX tvs body_ty arg_tys
  = ASSERT2( length arg_tys >= n_tvs, ppr tvs $$ ppr body_ty $$ ppr arg_tys )
    mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)
             (drop n_tvs arg_tys)
  where
    n_tvs = length tvs

{-
************************************************************************
*                                                                      *
                         Pred
*                                                                      *
************************************************************************

Predicates on PredType
-}
applyTysX tvs body_ty arg_tys
  = ASSERT2( length arg_tys >= n_tvs, ppr tvs $$ ppr body_ty $$ ppr arg_tys )
    mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)
             (drop n_tvs arg_tys)
  where
    n_tvs = length tvs

{-
************************************************************************
*                                                                      *
                         Pred
*                                                                      *
************************************************************************

Predicates on PredType
-}