X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnTypes.lhs;h=b739d6d3a871aa8fb3e56f8ea97a2333683f3cda;hb=f4b727487a65e6b611bbaafbd2207bd63a8df706;hp=3086b946d3da93503ff037fe7322287ff0606065;hpb=432b9c9322181a3644083e3c19b7e240d90659e7;p=ghc-hetmet.git diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index 3086b94..b739d6d 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -159,7 +159,7 @@ rnHsType doc (HsListTy ty) = do rnHsType doc (HsKindSig ty k) = do { kind_sigs_ok <- doptM Opt_KindSignatures - ; checkM kind_sigs_ok (addErr (kindSigErr ty)) + ; unless kind_sigs_ok (addErr (kindSigErr ty)) ; ty' <- rnLHsType doc ty ; return (HsKindSig ty' k) } @@ -191,6 +191,8 @@ rnHsType doc (HsDocTy ty haddock_doc) = do haddock_doc' <- rnLHsDoc haddock_doc return (HsDocTy ty' haddock_doc') +rnHsType _ (HsSpliceTyOut {}) = panic "rnHsType" + rnLHsTypes :: SDoc -> [LHsType RdrName] -> IOEnv (Env TcGblEnv TcLclEnv) [LHsType Name] rnLHsTypes doc tys = mapM (rnLHsType doc) tys @@ -211,7 +213,7 @@ rnForAll doc _ [] (L _ []) (L _ ty) = rnHsType doc ty -- of kind *. rnForAll doc exp forall_tyvars ctxt ty - = bindTyVarsRn doc forall_tyvars $ \ new_tyvars -> do + = bindTyVarsRn forall_tyvars $ \ new_tyvars -> do new_ctxt <- rnContext doc ctxt new_ty <- rnLHsType doc ty return (HsForAllTy exp new_tyvars new_ctxt new_ty) @@ -610,7 +612,7 @@ rnSplice :: HsSplice RdrName -> RnM (HsSplice Name, FreeVars) rnSplice (HsSplice n expr) = do { checkTH expr "splice" ; loc <- getSrcSpanM - ; [n'] <- newLocalsRn [L loc n] + ; n' <- newLocalBndrRn (L loc n) ; (expr', fvs) <- rnLExpr expr -- Ugh! See Note [Splices] above