mkTyApps  f args = foldl (\ e a -> App e (typeOrCoercion a)) f args
  where
    typeOrCoercion ty
      | Just co <- isCoercionTy_maybe ty = Coercion co
      | otherwise                        = Type ty
mkTyApps  f args = foldl (\ e a -> App e (typeOrCoercion a)) f args
  where
    typeOrCoercion ty
      | Just co <- isCoercionTy_maybe ty = Coercion co
      | otherwise                        = Type ty
mkTyApps  f args = foldl (\ e a -> App e (typeOrCoercion a)) f args
  where
    typeOrCoercion ty
      | Just co <- isCoercionTy_maybe ty = Coercion co
      | otherwise                        = Type ty