-\begin{code}
-mkSynTy tycon tys = panic "No longer used"
-{- Delete in due course
- | n_args == arity -- Exactly saturated
- = mk_syn tys
- | n_args > arity -- Over-saturated
- = case splitAt arity tys of { (as,bs) -> mkAppTys (mk_syn as) bs }
- -- Its important to use mkAppTys, rather than (foldl AppTy),
- -- because (mk_syn as) might well return a partially-applied
- -- type constructor; indeed, usually will!
- | otherwise -- Un-saturated
- = TyConApp tycon tys
- -- For the un-saturated case we build TyConApp directly
- -- (mkTyConApp ASSERTs that the tc isn't a SynTyCon).
- -- Here we are relying on checkValidType to find
- -- the error. What we can't do is use mkSynTy with
- -- too few arg tys, because that is utterly bogus.
-
- where
- mk_syn tys = NoteTy (SynNote (TyConApp tycon tys))
- (substTyWith tyvars tys body)
-
- (tyvars, body) = ASSERT( isSynTyCon tycon ) getSynTyConDefn tycon
- arity = tyConArity tycon
- n_args = length tys
--}
-\end{code}
-