-rnHsType doc (HsTupleTy tup_con tys)
- = mappM (rnLHsType doc) tys `thenM` \ tys' ->
- returnM (HsTupleTy tup_con tys')
-
-rnHsType doc (HsAppTy ty1 ty2)
- = rnLHsType doc ty1 `thenM` \ ty1' ->
- rnLHsType doc ty2 `thenM` \ ty2' ->
- returnM (HsAppTy ty1' ty2')
-
-rnHsType doc (HsPredTy pred)
- = rnPred doc pred `thenM` \ pred' ->
- returnM (HsPredTy pred')
-
-rnHsType doc (HsSpliceTy _)
- = do { addErr (ptext SLIT("Type splices are not yet implemented"))
- ; failM }
-
-rnHsType doc (HsDocTy ty haddock_doc)
- = rnLHsType doc ty `thenM` \ ty' ->
- rnLHsDoc haddock_doc `thenM` \ haddock_doc' ->
- returnM (HsDocTy ty' haddock_doc')
-
-rnLHsTypes doc tys = mappM (rnLHsType doc) tys
+rnHsType doc (HsTupleTy tup_con tys) = do
+ tys' <- mapM (rnLHsType doc) tys
+ return (HsTupleTy tup_con tys')
+
+rnHsType doc (HsAppTy ty1 ty2) = do
+ ty1' <- rnLHsType doc ty1
+ ty2' <- rnLHsType doc ty2
+ return (HsAppTy ty1' ty2')
+
+rnHsType doc (HsPredTy pred) = do
+ pred' <- rnPred doc pred
+ return (HsPredTy pred')
+
+rnHsType _ (HsSpliceTy _) =
+ failWith (ptext (sLit "Type splices are not yet implemented"))
+
+rnHsType doc (HsDocTy ty haddock_doc) = do
+ ty' <- rnLHsType doc ty
+ haddock_doc' <- rnLHsDoc haddock_doc
+ return (HsDocTy ty' haddock_doc')
+
+rnLHsTypes :: SDoc -> [LHsType RdrName]
+ -> IOEnv (Env TcGblEnv TcLclEnv) [LHsType Name]
+rnLHsTypes doc tys = mapM (rnLHsType doc) tys