+ let names = hsLTyVarNames tvs
+ mkWithKinds = map repTyVarBndrWithKind tvs
+ bndrs <- mapM lookupBinder names
+ kindedBndrs <- zipWithM ($) mkWithKinds bndrs
+ m kindedBndrs
+
+-- Produce kinded binder constructors from the Haskell tyvar binders
+--
+repTyVarBndrWithKind :: LHsTyVarBndr Name
+ -> Core TH.Name -> DsM (Core TH.TyVarBndr)
+repTyVarBndrWithKind (L _ (UserTyVar _)) = repPlainTV
+repTyVarBndrWithKind (L _ (KindedTyVar _ ki)) =
+ \nm -> repKind ki >>= repKindedTV nm